changeset 1545:49be0eeedda9

Upgrade binutils to the last GPLv2 commit in the .git repository (397a64b3, right before they poisoned gas). This includes the -Bsymbolic-functions thing musl needs (and oddly enough the first drop of armv7l support). Since "make dist" inexplicably doesn't work (because maintainers are _special_) the tarball was made via: git clean -fdx && git checkout -f && patch -p1 -i ~/aboriginal/sources/patches/binutils-screwinfo.patch && ./configure --disable-werror && make configure-host && find . -name Makefile | xargs sed -i 's/^all:/& $(DIST_COMMON) $(EXTRA_DIST) $(DIST_SOURCES)/' && make && patch -p1 -Ri ~/aboriginal/aboriginal/sources/patches/binutils-screwinfo.patch && make distclean This resurrects several of the things I worked out to build 2.18 back before I worked out the license on that had been changed by stealth. (This also gets us away from the 2.17 on the FSF website which the FSF retroactively replaced with a version containing GPLv3 source files last year).
author Rob Landley <rob@landley.net>
date Tue, 25 Sep 2012 19:42:33 -0500
parents e2f722cc97a6
children 09f18f222c92
files download.sh sources/patches/binutils-screwinfo.patch sources/sections/binutils.build
diffstat 3 files changed, 28 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/download.sh	Thu Sep 06 05:11:25 2012 -0500
+++ b/download.sh	Tue Sep 25 19:42:33 2012 -0500
@@ -32,11 +32,13 @@
 maybe_fork "download || dienow"
 
 
-# 2.17 was the last GPLv2 release of binutils
+# 2.17 was the last GPLv2 release of binutils, but git commit
+# 397a64b350470350c8e0adb2af84439ea0f89272 was the last GPLv2
+# _version_ of binutils. This tarball has prebuilt release files
+# so it builds without optional dependencies such as lex and yacc.
 
-URL=ftp://ftp.gnu.org/gnu/binutils/binutils-2.17.tar.bz2 \
-SHA1=a557686eef68362ea31a3aa41ce274e3eeae1ef0 \
-ALT=ftp://ftp.gnu.org/gnu/binutils/binutils-2.18.tar.bz2 \
+URL=http://landley.net/aboriginal/mirror/binutils-397a64b3.tar.bz2
+SHA1=efc2a12da60ebf56b98cb5edb8d9daaae6a49152 \
 maybe_fork "download || dienow"
 
 # 4.2.1 was the last GPLv2 release of gcc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/patches/binutils-screwinfo.patch	Tue Sep 25 19:42:33 2012 -0500
@@ -0,0 +1,18 @@
+The binutils build notices that makeinfo is missing, but fails anyway, breaking
+the build.  Make it stop.
+
+The "info" file format is obsolete (similar to "gopher"), was never used
+by anyone but the FSF, and failed to even replace man pages (which are
+now available in HTML).
+
+--- binutils-2.18/missing	2005-07-13 20:24:56.000000000 -0500
++++ binutils-2.18/missing	2008-08-11 02:05:47.000000000 -0500
+@@ -299,7 +299,7 @@
+     fi
+     # If the file does not exist, the user really needs makeinfo;
+     # let's fail without touching anything.
+-    test -f $file || exit 1
++    test -f $file || exit 0
+     touch $file
+     ;;
+ 
--- a/sources/sections/binutils.build	Thu Sep 06 05:11:25 2012 -0500
+++ b/sources/sections/binutils.build	Tue Sep 25 19:42:33 2012 -0500
@@ -2,7 +2,8 @@
 
 function configure_binutils()
 {
-  "$CURSRC/configure" --prefix="$STAGE_DIR" "$@" --target="$CROSS_TARGET" \
+  AR=ar AS=as LD=ld NM=nm OBJDUMP=objdump OBJCOPY=objcopy \
+    "$CURSRC/configure" --prefix="$STAGE_DIR" "$@" --target="$CROSS_TARGET" \
     --disable-nls --disable-shared --disable-multilib --disable-werror \
     --with-lib-path=lib --program-prefix="$TOOLCHAIN_PREFIX" $BINUTILS_FLAGS
 
@@ -38,7 +39,9 @@
 
 make -j $CPUS configure-host &&
 make -j $CPUS CFLAGS="-O2 $STATIC_FLAGS $CFLAGS" &&
+ln -s lib "$STAGE_DIR/lib64" &&
 make -j $CPUS install &&
+rm "$STAGE_DIR/lib64" &&
 
 # Fix up install