ld build configured with additional targets is broken

Matthias Klose doko@ubuntu.com
Thu Oct 27 16:47:00 GMT 2016


Hi Nick,

this change

2016-10-11  Nick Clifton  <nickc@redhat.com>

        PR ld/20535
        * emultempl/elf32.em (_search_needed): Add support for pseudo
        environment variables supported by ld.so.  Namely $ORIGIN, $LIB
        and $PLATFORM.
        * configure.ac: Add getauxval to list AC_CHECK_FUNCS list.
        * config.in: Regenerate.
        * configure: Regenerate.

breaks a build configured with
--enable-targets=aarch64-linux-gnu,aarch64_be-linux-gnu,alpha-linux-gnu,arm-linux-gnueabi,hppa-linux-gnu,i686-linux-gnu,ia64-linux-gnu,m32r-linux-gnu,m68k-linux-gnu,m68k-rtems,mips-linux-gnu,mipsel-linux-gnu,mips64-linux-gnuabin32,mips64el-linux-gnuabin32,mips64-linux-gnu,mips64el-linux-gnu,mipsisa32r6-linux-gnu,mipsisa32r6el-linux-gnu,mipsisa64r6-linux-gnuabin32,mipsisa64r6el-linux-gnuabin32,mipsisa64r6-linux-gnuabi64,mipsisa64r6el-linux-gnuabi64,powerpc-linux-gnu,powerpc64-linux-gnu,powerpc64le-linux-gnu,s390-linux-gnu,s390x-linux-gnu,sh-linux-gnu,sparc-linux-gnu,sparc64-linux-gnu,x86_64-linux-gnu,x86_64-linux-gnux32,m32r-linux-gnu,x86_64-pep

glibc-2.24, with

gcc -DHAVE_CONFIG_H -I. -I../../ld  -I. -I../../ld -I../bfd -I../../ld/../bfd
-I../../ld/../
include  -g -O2 -DENABLE_PLUGINS -DLOCALEDIR="\"/usr/share/locale\""  -W -Wall
-Wstrict-prot
otypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144
-DELF_LIST_OPTIONS=TRUE -DELF_SHLI
B_LIST_OPTIONS=TRUE -DELF_PLT_UNWIND_LIST_OPTIONS=TRUE -g -O2 -MT eelf32btsmip.o
-MD -MP -MF
 .deps/eelf32btsmip.Tpo -c -o eelf32btsmip.o eelf32btsmip.c
In file included from /usr/include/x86_64-linux-gnu/sys/auxv.h:22:0,
                 from eelf32btsmip.c:684:
/usr/include/elf.h:1582:3: error: conflicting types for 'Elf32_gptab'
 } Elf32_gptab;
   ^~~~~~~~~~~
In file included from eelf32btsmip.c:108:0:
../../ld/../include/elf/mips.h:534:3: note: previous declaration of
'Elf32_gptab' was here
 } Elf32_gptab;
   ^~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/auxv.h:22:0,
                 from eelf32btsmip.c:684:
[...]

The include is conditional for native builds, but apparently it doesn't take the
configuration with additional targets into account.

Debian/Ubuntu build such a binutils-multiarch package shipping the binaries nm
objdump objcopy strings strip size ar ranlib addr2line gprof readelf, but not ld.

Matthias



More information about the Binutils mailing list