From: Andrew Burgess <aburgess@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org, Guinevere Larsen <guinevere@redhat.com>
Subject: Re: [PATCH] [GDB 18] gdb/configure: fix string quoting in AC_MSG_WARN and AC_MSG_ERROR
Date: Tue, 11 Aug 2026 17:33:59 +0100 [thread overview]
Message-ID: <87v79gk45k.fsf@redhat.com> (raw)
In-Reply-To: <86bjb8ye3r.fsf@gnu.org>
Adding Guinevere to the CC list as the author of this feature.
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Andrew Burgess <aburgess@redhat.com>
>> Cc: Eli Zaretskii <eliz@gnu.org>,
>> Andrew Burgess <aburgess@redhat.com>
>> Date: Tue, 11 Aug 2026 14:02:06 +0100
>>
>> If / when approve I plan to push this to both master and gdb-18-branch.
>
> Thanks. I have a question about this below.
>
>> Now when configuring with
>> --enable-binary-file-formats='coff,xcoff,elf,macho' on a target that
>> doesn't support Mach-O, e.g. GNU/Linux, the configure will stop like
>> this:
>>
>> checking for ELF support in BFD... yes
>> checking for library containing dlopen... (cached) none required
>> checking for Mach-O support in BFD... no
>> configure: error: Mach-O support was requested, but BFD does not support it
>> make: *** [Makefile:13461: configure-gdb] Error 1
>
> Hmm... so building with Mach-O support on GNU/Linux and MS-Windows is
> not possible at all? I'm not sure I understand the "BFD does not
> support it" part of the error message: shouldn't BFD that is compiled
> as part of GDB be configured to support Mach-O when GDB is configured
> with --enable-binary-file-formats='coff,xcoff,elf,macho'? Or what am
> I missing?
My understand is that to get support for Mach-O you'll need to use
--enable-targets=.... to add a suitable target in addition to the
default (GNU/Linux or Windows depending on the build host).
Doing this will, I believe, cause BFD to be built with support for that
target.
The --enable-binary-file-formats flag then controls the GDB side of
things, you could choose to exclude macho support from GDB if you
wished.
I'm not sure the use case for doing that is super obvious, and I think
that macho is probably a choice for a motivating use case.
If we consider coff/xcoff, which on GNU/Linux we get "for free". But
supporting these in GDB means we have an increased surface area for
bugs, all in code that many GNU/Linux distros don't care about.
The motivation for the --enable-binary-file-formats flag was to be able
to compile a GDB that runs on GNU/Linux and only supports ELF.
Hopefully Guinevere will chip in and correct any mistakes I've made in
the above explanation.
Thanks,
Andrew
next prev parent reply other threads:[~2026-08-11 16:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 13:02 Andrew Burgess
2026-08-11 13:35 ` Eli Zaretskii
2026-08-11 16:33 ` Andrew Burgess [this message]
2026-08-12 19:02 ` Guinevere Larsen
2026-08-12 19:55 ` Tom Tromey
2026-08-13 9:08 ` Andrew Burgess
2026-08-13 12:21 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v79gk45k.fsf@redhat.com \
--to=aburgess@redhat.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=guinevere@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox