Mercurial > hg > aboriginal
view sources/sections/binutils.build @ 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 | a9685aea2a2c |
children | 3675adfb4e36 |
line wrap: on
line source
# Build binutils, which provides the linker and assembler and such. function configure_binutils() { 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 [ $? -ne 0 ] && dienow } # Don't require objective C on the host. find . -name "*.m" | xargs rm blank_workdir build-binutils if [ -z "$HOST_ARCH" ] then # Create a simple cross compiler, from this host to target $ARCH. # This has no prerequisites. # Define lots of environment variables to make configure behave. AR=ar AS=as LD=ld NM=nm OBJDUMP=objdump OBJCOPY=objcopy configure_binutils else # Canadian cross for an arbitrary host/target. The new compiler will run # on $HOST_ARCH as its host, and build executables for $ARCH as its target. # (Use host==target to produce a native compiler.) Doing this requires # existing host ($HOST_ARCH) _and_ target ($ARCH) cross compilers as # prerequisites. AR="${HOST_ARCH}-ar" CC="${HOST_ARCH}-cc" configure_binutils \ --build="$CROSS_HOST" --host="$CROSS_TARGET" fi # Now that it's configured, build and install binutils 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 mkdir -p "$STAGE_DIR/include" && cp "$CURSRC/include/libiberty.h" "$STAGE_DIR/include" || dienow if [ -z "$NO_CLEANUP" ] then cd .. && rm -rf build-binutils || dienow fi