From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 48994396EC21; Thu, 26 Nov 2020 10:00:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 48994396EC21 From: "eblot.ml at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/26949] New: ELF target support seems broken on macOS 11 Date: Thu, 26 Nov 2020 10:00:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 10.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: eblot.ml at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2020 10:00:32 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26949 Bug ID: 26949 Summary: ELF target support seems broken on macOS 11 Product: gdb Version: 10.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: eblot.ml at gmail dot com Target Milestone: --- On macOS 11 (Big Sur), when GDB is built with an ELF target, for example --target=3Driscv64-unknown-elf, GDB builds successfully. At runtime, when an ELF file is loaded in GDB, the following message is rai= sed: I'm sorry, Dave, I can't do that. Symbol format `elf32-littleriscv' unknow= n. It appears that despite the successful build, GDB does not include ELF supp= ort, as gdb/config.h contains `#undef HAVE_ELF` The root cause seems to be the gdb/configure script that fails to valide BFD ELF support, around line 16832 on GDB 10.1, although the same issue arise w= ith the previous GDB 9.2 release. The generated conftest.c test fails as strncmp function is used, but has not been included. I have not checked why the test file works on Linux hosts and not on macOS hosts. Anyway, adding to acinclude.m4 fixes the trouble on macOS, such = as with: --- a/gdb/acinclude.m4 2020-11-26 10:10:52.000000000 +0100 +++ b/gdb/acinclude.m4 2020-11-26 10:12:25.000000000 +0100 @@ -362,6 +362,7 @@ AC_CACHE_CHECK([$1], [$2], [AC_TRY_LINK( [#include + #include #include "bfd.h" #include "$4" ], although I have no idea if this is the proper way to fix it. At least GDB k= eeps building in macOS 11, and the resulting gdb application is able to load ELF files. As a side note, is it an expected behaviour that building for an explicit E= LF target completes successfully although ELF support cannot be included? --=20 You are receiving this mail because: You are on the CC list for the bug.=