summaryrefslogtreecommitdiffstats
path: root/gcc5/build/gcc5.SlackBuild
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2018-03-06 13:40:02 +0000
committer Eric Hameleers <alien@slackware.com>2018-03-06 13:40:02 +0000
commit488e1b8a5b10d510254b7423a9b8ac62bed8fe29 (patch)
tree051879dda6e2827ce02c73501fcc44b451a56983 /gcc5/build/gcc5.SlackBuild
parent7ddfc7e13f160a14a8a4e10e937da2048cab48a7 (diff)
downloadasb-488e1b8a5b10d510254b7423a9b8ac62bed8fe29.tar.gz
asb-488e1b8a5b10d510254b7423a9b8ac62bed8fe29.tar.xz
gcc5: updated to 5.5.0
Diffstat (limited to 'gcc5/build/gcc5.SlackBuild')
-rwxr-xr-xgcc5/build/gcc5.SlackBuild36
1 files changed, 27 insertions, 9 deletions
diff --git a/gcc5/build/gcc5.SlackBuild b/gcc5/build/gcc5.SlackBuild
index d5677935..8ee64c83 100755
--- a/gcc5/build/gcc5.SlackBuild
+++ b/gcc5/build/gcc5.SlackBuild
@@ -24,7 +24,7 @@
#
# Modified 2011 by Eric Hameleers <alien at slackware.com> for OpenJDK.
-# Modified 2017 by Eric Hameleers <alien at slackware.com> for gcc5.
+# Modified 2017, 2018 by Eric Hameleers <alien at slackware.com> for gcc5.
# Some notes, Fri May 16 12:31:32 PDT 2003:
#
@@ -54,9 +54,9 @@
# instructions. No need to throw i586 CPUs under the bus (yet).
PRGNAM=gcc5
-VERSION=${VERSION:-5.4.0}
+VERSION=${VERSION:-5.5.0}
MAJVER=$(echo ${VERSION} |cut -d. -f1)
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
TAG=${TAG:-alien}
# How many jobs to run in parallel:
@@ -169,11 +169,12 @@ cat $CWD/slack-desc.gcc5 | sed -e "s/@MULTILIB@/${SLDESC}/" \
# Unpack the gcc sources:
cd $TMP
-tar xvf $CWD/gcc-$VERSION.tar.?z*
+tar xvf $CWD/gcc-$VERSION.tar.?z
-( cd gcc-$VERSION/gcc
- cat $CWD/patches/gcc.66782.diff | patch -p0 --verbose || exit 1
-) || exit 1
+# Patches based inside the gcc directory go here:
+#( cd gcc-$VERSION/gcc
+# cat $CWD/patches/gcc.66782.diff | patch -p0 --verbose || exit 1
+#) || exit 1
if echo $LANGS | grep -wq java ; then
# Copy ecj.jar into the TLD of the source. Needed for java compiler.
@@ -190,6 +191,23 @@ fi
( cd gcc-$VERSION
# Smite the fixincludes:
cat $CWD/patches/gcc-no_fixincludes.diff | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+ # Add retpoline support:
+ cat $CWD/patches/0001-i386-Move-struct-ix86_frame-to-machine_function.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0003-i386-More-use-reference-of-struct-ix86_frame-to-avoi.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0004-i386-Don-t-use-reference-of-struct-ix86_frame.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0005-x86-Add-mindirect-branch-doc.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0005-x86-Add-mindirect-branch.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0006-x86-Add-mfunction-return-doc.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0006-x86-Add-mfunction-return.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0007-x86-Add-mindirect-branch-register-doc.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0007-x86-Add-mindirect-branch-register.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0008-x86-Add-V-register-operand-modifier-doc.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0008-x86-Add-V-register-operand-modifier.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0009-x86-Disallow-mindirect-branch-mfunction-return-with-.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0009-x86-Disallow-mindirect-branch-mfunction-return-with-doc.diff | patch -p2 --verbose || exit 1
+
# Fix perms/owners
chown -R root:root .
find . -perm 777 -exec chmod 755 {} \;
@@ -547,8 +565,8 @@ if echo $LANGS|grep -wq java ; then
fi
# Filter all .la files (thanks much to Mark Post for the sed script):
-( cd $TMP
- for file in $(find $PKG -type f -name "*.la") ; do
+( cd $PKG
+ for file in $(find . -type f -name "*.la") ; do
cat $file | sed -e 's%-L'${TMP}'[[:graph:]]* % %g' > $TMP/tmp-la-file
cat $TMP/tmp-la-file > $file
done