Here's what's to be done for maintaining GNU Binutils.
As these tools primarily deal with low-level parts of the target architecture and the object file format (ELF ABI), which are essentially (at least meant to be) the same, there shouldn't be many differences comparing the binutils between the GNU/Hurd and GNU/Linux ports, for example. There are a few, though, as explained below.
General information
Sources
Configuration
Last reviewed up to the Git mirror's 5c3ec1ded654250e0ac27df79998b32b2403e81f (2013-04-29) sources.
Globally
a.out (such as
ld/emulparams/i386linux.sh,ld/emultempl/linux.em, etc.), COFF, PE image support and 64-bit support are not interesting.In the testsuites,
.expand.dfiles very likely should not only care for*-*-linux*, but also*-*-gnu*. (If they need to be conditionalized like this at all.)
bfd/config.bfdi[3-7]86-*-gnu*Comparing to
i[3-7]86-*-linux-*:i386linux_vec-- a.out.i386pei_vec-- PE.64 bit.
configure.hostSouldn't need anything. x86 Linux neither.
configure.inLinux:
COREFILE=trad-core.lowithTRAD_HEADER='"hosts/i386linux.h"'We don't have any such core file support configured. TODO: should we? Where is this core file reading exactly used? GDB?
i386linux_vec-- a.out.i386pei_vec-- PE.
binutils/configure.tgt
gas/config/te-gnu.hC.f.
te-linux.h; search tree forTE_LINUXvs.TE_GNUusage.tc-i386.hSole
TE_LINUXusage is for a.out.
configure.tgt
ld/configure.host*-*-gnu*TODO: resolve
crt0.ovs.crt1.oissue. Testsuite failures.configure.tgti[3-7]86-*-gnu*
Compare to
i[3-7]86-*-linux-*, but don't need a.out (i386linux) and 64 bit support.
__ehdr_start symbol, c84ed8d89d0b8bf5a2968d465f77ac24bcfc40c2 -- can this be helpful in the exec server, glibc, or elsewhere? Used in GDB (BFD) commit bdbd9758806ed855af89244870fdc52cf3ff09bc.Add HOSTING_SCRT0 for PIE test, 49cc20aa5c416ea4307931cccf6353247368187d -- is for GNU/Linux only; but also seems unused.
Build
Here's a log of a binutils build run; this is from our Git
repository's tschwinge/Paul_Desmond branch,
commit 5c3ec1ded654250e0ac27df79998b32b2403e81f (2013-04-29), run on
kepler.SCHWINGE and coulomb.SCHWINGE.
$ export LC_ALL=C
$ ../Paul_Desmond/configure --prefix="$PWD".install --enable-gold --with-sysroot=/ SHELL=/bin/dash CC=gcc-4.7 CXX=g++-4.7 2>&1 | tee log_build
[...]
$ make 2>&1 | tee log_build_
[...]
Different hosts may default to different shells and compiler versions; thus
harmonized. Debian GCC (which is used in binutils' testsuite) likes to pass
--sysroot=/ to ld, so we need to configure binutils with support for
sysroots.
This takes up around 950 MiB, and needs roughly 13 min on kepler.SCHWINGE and 45 min on coulomb.SCHWINGE.
Analysis
x86 GNU/Linux' and GNU/Hurd's configurations are slightly different, thus mask out most of the differences that are due to GNU/Linux supporting more core file formats, and more emulation vectors.
$ toolchain/logs/process binutils build
gold GNU/Linux vs. GNU/Hurd
-checking for glibc ifunc support... both +checking for glibc ifunc support... dynMissing IFUNC support on GNU/Hurd.
944a6010b676b9f80f0a16c65183102b187822c5..a5e5fda5f96d5b881a354bd8666fdbb1496ee8da:
gcc-4.6 -c -DHAVE_CONFIG_H -g -O2 -I. -I../../Paul_Desmond/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../../Paul_Desmond/libiberty/hashtab.c -o hashtab.o +../../Paul_Desmond/libiberty/hashtab.c: In function 'hash_pointer': +../../Paul_Desmond/libiberty/hashtab.c:1001:7: warning: right shift count >= width of type [enabled by default]
Install
$ make install 2>&1 | tee log_install
[...]
This takes up around 150 MiB, and needs roughly 1 min on kepler.SCHWINGE and 3 min on coulomb.SCHWINGE.
Analysis
$ toolchain/logs/process binutils install
libtool: finish:ldconfigis not run for the Hurd.
Testsuite
$ make -k check 2>&1 | tee log_test
[...]
This needs roughly 6 min on kepler.SCHWINGE and 45 min on coulomb.SCHWINGE.
Analysis
$ toolchain/logs/process binutils test
-
The testsuite isn't prepared for using
crt0.oinstead ofcrt1.odepending on whether a static or dynamic executable is created. Documented inld/configure.host. Perhaps we should finally rewrite this messy code in glibc? Or, something similar to commit 49cc20aa5c416ea4307931cccf6353247368187dAdd HOSTING_SCRT0 for PIE testcan be used.Same issue for
FAIL: Common symbol override ifunc *ones? -
On the idle grubber, this one takes a few minutes wall time to complete successfully (I/O system weakness), so assuming some system load variation, the testsuite's timeout may trigger.
-
I suppose this is due to us having an override w.r.t. weak symbol handling in glibc, needed for our external libpthread. TODO: document properly.
FAIL: gas/i386/reptAdded in commit 06f1247c54126b9f1e6acb8ff8c7be35aec6f44c (2012-06-07) as part of the fix for sourceware [BZ #14201], renamed in commit d654e24bbc2f601df4dc43b26049b0339528b93a (2012-06-07):
WARNING: program timed out. FAIL: gas/i386/reptld IFUNC execution tests
Missing IFUNC support on GNU/Hurd.
Added in commit 82c5587db078581cfe94a4385ed99de1d1fa6657 (2012-09-19):
FAIL: Common symbol override ifunc test 1a FAIL: Common symbol override ifunc test 1bgold GNU/Linux vs. GNU/Hurd
-FAIL: relro_test.sh +PASS: relro_test.sh -PASS: ver_matching_test.sh +FAIL: ver_matching_test.sh -PASS: script_test_3 +FAIL: script_test_3 -PASS: tls_phdrs_script_test +FAIL: tls_phdrs_script_test -PASS: ifuncmain1static -PASS: ifuncmain1picstatic -PASS: ifuncmain2static -PASS: ifuncmain2picstatic -PASS: ifuncmain4static -PASS: ifuncmain4picstatic -PASS: ifuncmain5static -PASS: ifuncmain5picstatic -PASS: ifuncmain7static -PASS: ifuncmain7picstatic
