summaryrefslogtreecommitdiff
path: root/source/d/binutils/binutils.SlackBuild
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2011-04-25 13:37:00 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 22:45:18 +0200
commit75a4a592e5ccda30715f93563d741b83e0dcf39e (patch)
tree502f745607e77a2c4386ad38d818ddcafe81489c /source/d/binutils/binutils.SlackBuild
parentb76270bf9e6dd375e495fec92140a79a79415d27 (diff)
downloadcurrent-75a4a592e5ccda30715f93563d741b83e0dcf39e.tar.gz
Slackware 13.37slackware-13.37
Mon Apr 25 13:37:00 UTC 2011 Slackware 13.37 x86_64 stable is released! Thanks to everyone who pitched in on this release: the Slackware team, the folks producing upstream code, and linuxquestions.org for providing a great forum for collaboration and testing. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. As always, thanks to the Slackware community for testing, suggestions, and feedback. :-) Have fun!
Diffstat (limited to 'source/d/binutils/binutils.SlackBuild')
-rwxr-xr-xsource/d/binutils/binutils.SlackBuild32
1 files changed, 31 insertions, 1 deletions
diff --git a/source/d/binutils/binutils.SlackBuild b/source/d/binutils/binutils.SlackBuild
index b0ffefb6..a5616ea2 100755
--- a/source/d/binutils/binutils.SlackBuild
+++ b/source/d/binutils/binutils.SlackBuild
@@ -37,8 +37,27 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
+# Uncomment this to include the experimental gold linker:
+GOLD=" --enable-gold=yes --enable-ld=default "
+
+# Set to ld.gold or ld.bfd:
+DEFAULT_LD=ld.bfd
+
+# The --enable-initfini-array option was added in binutils-2.21.51.0.3.
+# This option currently causes a world of hurt trying to compile glibc,
+# and might break static libraries or cause other ill effects. There
+# is an upstream patch for glibc but it does not avoid all of the known
+# problems (and there may be some unknown ones, too), so we will avoid
+# introducing this feature for now.
+# References:
+# http://sourceware.org/bugzilla/show_bug.cgi?id=12343
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770
+NO_INITFINI=" --disable-initfini-array "
+
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ # The config option below is currently needed to compile on x86:
+ WERROR="--enable-werror=no"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -78,7 +97,12 @@ CFLAGS="$SLKCFLAGS" \
--enable-shared \
--enable-multilib \
--enable-64-bit-bfd \
+ --enable-plugins \
+ --enable-threads \
--enable-targets=$ARCH-slackware-linux \
+ $GOLD \
+ $NO_INITFINI \
+ $WERROR \
--build=$ARCH-slackware-linux \
|| exit 1
@@ -97,13 +121,19 @@ cp -a include/libiberty.h $PKG/usr/include/libiberty.h
mv $PKG/usr/${ARCH}-slackware-linux/lib/ldscripts $PKG/usr/lib${LIBDIRSUFFIX}
( cd $PKG/usr/${ARCH}-slackware-linux
ln -s /usr/lib${LIBDIRSUFFIX}/ldscripts lib/ldscripts
- for FILE in ar as ld nm objcopy objdump ranlib strip ; do
+ for FILE in ar as ld ld.bfd ld.gold nm objcopy objdump ranlib strip ; do
if [ -r "/usr/bin/$FILE" ]; then
rm -f bin/$FILE
ln -s /usr/bin/$FILE bin/$FILE
fi
done
)
+
+# If the requested default linker is present, make it the default:
+# Set the link differently on the system to change the default at runtime.
+if [ -r $PKG/usr/bin/$DEFAULT_LD ]; then
+ ( cd $PKG/usr/bin ; rm -f ld ; ln -sf $DEFAULT_LD ld )
+fi
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null