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 6de66ef60a39ab2cdacf801dae0110f36a76537c (2012-02-15) sources.
Globally
a.out, 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 the 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.
Build
Here's a log of a binutils build run; this is from our Git repository's f42a507c8b1e79cec0e755249e9fb5c2e012fe83 (2012-02-15) sources, run on kepler.SCHWINGE and coulomb.SCHWINGE.
$ export LC_ALL=C
$ ../master/configure --prefix="$PWD".install SHELL=/bin/dash CC=gcc-4.6 CXX=g++-4.6 2>&1 | tee log_build
[...]
$ make 2>&1 | tee log_build_
[...]
Different hosts may default to different shells and compiler versions; thus harmonized.
This takes up around 120 MiB, and needs roughly 4 min on kepler.SCHWINGE and 15 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.
$ diff -wu <(ssh kepler.SCHWINGE 'cd tmp/source/binutils/ && cat hurd/master.build/log_build* | sed -e "s%\(/media/data\)\?${PWD}%[...]%g"' | sed -f open_issues/binutils/log_build-linux.sed) <(ssh coulomb.SCHWINGE 'cd tmp/binutils/ && cat hurd/master.build/log_build* | sed -e "s%\(/media/erich\)\?${PWD}%[...]%g"' | sed -f open_issues/binutils/log_build-hurd.sed) > open_issues/binutils/log_build.diff
Install
$ make install 2>&1 | tee log_install
[...]
This takes up around 70 MiB, and needs roughly 1 min on kepler.SCHWINGE and 3 min on coulomb.SCHWINGE.
Analysis
$ diff -wu <(ssh kepler.SCHWINGE 'cd tmp/source/binutils/ && cat hurd/master.build/log_install | sed -e "s%\(/media/data\)\?${PWD}%[...]%g"' | sed -f open_issues/binutils/log_install-linux.sed) <(ssh coulomb.SCHWINGE 'cd tmp/binutils/ && cat hurd/master.build/log_install | sed -e "s%\(/media/erich\)\?${PWD}%[...]%g"' | sed -f open_issues/binutils/log_install-hurd.sed) > open_issues/binutils/log_install.diff
libtool: finish:ldconfigis not run for the Hurd.
Testsuite
$ make -k check
[...]
This needs roughly 3 min on kepler.SCHWINGE and 13 min on coulomb.SCHWINGE.
$ ssh kepler.SCHWINGE 'cd tmp/source/binutils/ && cat hurd/master.build/*/*.sum hurd/master.build/*/*/*.sum | sed -e "s%\(/media/data\)\?${PWD}%[...]%g"' > open_issues/binutils/sum_linux
$ ssh coulomb.SCHWINGE 'cd tmp/binutils/ && cat hurd/master.build/*/*.sum hurd/master.build/*/*/*.sum | sed -e "s%\(/media/erich\)\?${PWD}%[...]%g"' > open_issues/binutils/sum_hurd
Comparing the results files, sum linux to sum hurd:
$ diff -u -F ^Running open_issues/binutils/sum_linux open_issues/binutils/sum_hurd > open_issues/binutils/sum.diff
Analysis
-
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? -
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.
