summaryrefslogtreecommitdiffstats
path: root/source/d/binutils/binutils.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/binutils/binutils.SlackBuild')
-rwxr-xr-xsource/d/binutils/binutils.SlackBuild68
1 files changed, 54 insertions, 14 deletions
diff --git a/source/d/binutils/binutils.SlackBuild b/source/d/binutils/binutils.SlackBuild
index f6ea8bb07..ff401137a 100755
--- a/source/d/binutils/binutils.SlackBuild
+++ b/source/d/binutils/binutils.SlackBuild
@@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=binutils
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
@@ -94,24 +94,58 @@ tar xvf $CWD/binutils-$VERSION.tar.?z || exit 1
cd binutils-$VERSION || exit 1
# Various upstream patches:
-zcat $CWD/patches/binutils-2.20.51.0.2-libtool-lib64.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/patches/binutils-2.25-version.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/patches/binutils-2.25-set-long-long.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/patches/binutils-2.20.51.0.10-copy-osabi.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/patches/binutils-2.20.51.0.10-sec-merge-emit.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/patches/binutils-2.24-ldforcele.patch.gz | patch -p1 --verbose || exit 1
-
-# Export the demangle.h header file:
-zcat $CWD/patches/binutils.export.demangle.h.diff.gz | patch -p1 --verbose || exit 1
-# Don't check to see if "config.h" was included in the installed headers:
-zcat $CWD/patches/binutils.no-config-h-check.diff.gz | patch -p1 --verbose || exit 1
+# (none currently)
+
+# These were shipped empty and will need to be regenerated:
+rm -f binutils/doc/*.1 binutils/doc/*.man gprof/gprof.1 ld/ld.1 gas/doc/as.1
+
+# Export the demangle.h header file (I suspect this is obsolete...):
+zcat $CWD/patches/binutils-export-demangle.h.patch.gz | patch -p1 --verbose || exit 1
-# Revert patch that breaks the kernel build:
-zcat $CWD/patches/0001-ELF-Don-t-generate-unused-section-symbols.patch.gz | patch -p1 -R --verbose || exit 1
+# Don't check to see if "config.h" was included in the installed headers:
+zcat $CWD/patches/binutils-no-config-h-check.patch.gz | patch -p1 --verbose || exit 1
# Set %version to something halfway meaningful:
+zcat $CWD/patches/binutils-version.patch.gz | patch -p1 --verbose || exit 1
sed -i -e 's/%''{release}/slack15/g' bfd/Makefile{.am,.in}
+# Use the "unsigned long long" type for pointers on hosts where long is a
+# 32-bit type but pointers are a 64-bit type. Necessary because users expect
+# to be able to install both the x86 and x86_64 versions of binutils on the
+# same machine, so they need identical versions of the bfd.h header file.
+zcat $CWD/patches/binutils-use-long-long.patch.gz | patch -p1 --verbose || exit 1
+
+# Work around a bug caused by binutils using an ancient libtool:
+zcat $CWD/patches/binutils-libtool-lib64.patch.gz | patch -p1 --verbose || exit 1
+
+# Various regression fixes:
+zcat $CWD/patches/binutils-2.27-aarch64-ifunc.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-CVE-2019-1010204.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-bfd-close-fds.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-do-not-link-with-static-libstdc++.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-dwarf-5-dir0.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-filename-in-error-messages.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-fix-testsuite-failures.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-gold-i386-gnu-property-notes.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-gold-mismatched-section-flags.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-gold-warn-unsupported.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-missing-man-pages.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-readelf-other-sym-info.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-revert-PLT-elision.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-special-sections-in-groups.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-testsuite-fixes.patch.gz | patch -p1 --verbose || exit 1
+
+# Thanks to Fedora:
+# Dependencies are not set up to rebuild the configure files
+# in the subdirectories. So we just rebuild the ones we care
+# about after applying the configure patches
+pushd libiberty
+autoconf
+popd
+pushd intl
+autoconf
+popd
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -182,6 +216,12 @@ rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
# that use that name:
( cd $PKG/usr/bin ; ln -sf strings strings-GNU )
+## Copy demangle.h, since some things might be looking for it in /usr/include,
+## and others in /usr/include/libiberty:
+#if [ -e $PKG//usr/include/libiberty/demangle.h -a ! -e $PKG//usr/include/demangle.h ]; then
+# cp -a $PKG//usr/include/libiberty/demangle.h $PKG//usr/include/demangle.h
+#fi
+
## OBSOLETE, since we're using tooldir=/usr. But we'll keep this cruft as a
## reference until we get the all clear on the tooldir= changes. :-)
## Move ldscripts to /usr/lib${LIBDIRSUFFIX}, and then put symlinks in place