summaryrefslogtreecommitdiffstats
path: root/development/gcc5/gcc5.SlackBuild
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2018-03-01 23:54:44 +0100
committer Matteo Bernardini <ponce@slackbuilds.org>2021-04-18 12:22:51 +0200
commit786c4c99119f573ab454dfb0e9645778faed1148 (patch)
tree566814b2f874c02b46a2c55b5bfec6d3c0f1c543 /development/gcc5/gcc5.SlackBuild
parent71e30bdc970908d251aff5d90f9805a57506e384 (diff)
downloadslackbuilds-786c4c99119f573ab454dfb0e9645778faed1148.tar.gz
slackbuilds-786c4c99119f573ab454dfb0e9645778faed1148.tar.xz
development/gcc5: update to 5.5.0
This re-aligns the gcc5.SlackBuild script with the latest gcc.SlackBuild in Slackware 14.2. Retpoline patches are included. Signed-off-by: Eric Hameleers <alien@slackware.com> Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'development/gcc5/gcc5.SlackBuild')
-rw-r--r--development/gcc5/gcc5.SlackBuild36
1 files changed, 27 insertions, 9 deletions
diff --git a/development/gcc5/gcc5.SlackBuild b/development/gcc5/gcc5.SlackBuild
index 007936359d..7054b3184f 100644
--- a/development/gcc5/gcc5.SlackBuild
+++ b/development/gcc5/gcc5.SlackBuild
@@ -2,7 +2,7 @@
# GCC package build script (written by volkerdi@slackware.com)
#
# Copyright 2003, 2004 Slackware Linux, Inc., Concord, California, USA
-# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -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,7 +54,7 @@
# 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:-1}
TAG=${TAG:-SBo}
@@ -158,11 +158,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 || exit 1
-( 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
# Copy ecj.jar into the TLD of the source. Needed for java compiler.
# This can be retrieved from ftp://sourceware.org/pub/java
@@ -177,6 +178,23 @@ ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1)
( 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 {} \;
@@ -518,8 +536,8 @@ cat $CWD/libgcj-5.pc \
> $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/libgcj-5.pc
# 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