This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] fix bootstrap in libbacktrace for FreeBSD
- From: Ian Lance Taylor <iant at google dot com>
- To: Andreas Tobler <andreast-list at fgznet dot ch>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 10 Oct 2012 08:36:37 -0700
- Subject: Re: [patch] fix bootstrap in libbacktrace for FreeBSD
- References: <50757BE9.4080002@fgznet.ch>
On Wed, Oct 10, 2012 at 6:45 AM, Andreas Tobler <andreast-list@fgznet.ch> wrote:
>
> FreeBSD has already defined the various Elf_ stuff for 32 and 64-bit
> targets.
>
> Currently compilation in libbacktrace fails due to redefinition of these:
>
> - Elf_Ehdr
> - Elf_Sym
> - Elf_Shdr
>
> I 'fixed' this with ifndef'ing. See below.
I don't think that is the right patch. I think the right patch is to
unconditionally rename the structs in libbacktrace/elf.c. Do you want
to try a patch along those lines?
I suppose we might want to rename the types as well. It's nice to use
the same names as the ELF ABI, but I guess that conflicts with system
header files are too likely.
Ian