From b7292f4f195ff93ff401597b189a74c51272e475 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Mon, 3 Aug 2015 23:36:18 +0000 Subject: gcc-multilib: add c89.sh and c99.sh scripts for better POSIX compliance. Switch the 32bit ARCH to i586. --- current/gcc/gcc-multilib.SlackBuild | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'current') diff --git a/current/gcc/gcc-multilib.SlackBuild b/current/gcc/gcc-multilib.SlackBuild index e8b3db8..2f370ac 100755 --- a/current/gcc/gcc-multilib.SlackBuild +++ b/current/gcc/gcc-multilib.SlackBuild @@ -44,9 +44,17 @@ # I see no reason to continue 386 support in the latest Slackware (and indeed # it's no longer easily possible). +# Some more notes, Mon Aug 3 19:49:51 UTC 2015: +# +# Changing to -march=i586 for 32-bit x86 as several things (Mesa being one of +# them) no longer work if constrained to -march=i486. We're not going to use +# -march=i686 since the only additional opcode is CMOV, which is actually less +# efficient on modern CPUs running in 32-bit mode than the alternate i586 +# instructions. No need to throw i586 CPUs under the bus (yet). + PKGNAM=gcc VERSION=${VERSION:-4.9.2} -BUILD=${BUILD:-2alien} +BUILD=${BUILD:-3alien} # How many jobs to run in parallel: NUMJOBS=" -j7 " @@ -60,7 +68,7 @@ echo "Building these compilers: $LANGS"; sleep 5 export MARCH=$( uname -m ) if [ -z "$ARCH" ]; then case "$MARCH" in - i?86) export ARCH=i486 ;; + i?86) export ARCH=i586 ;; armv7hl) export ARCH=$MARCH ;; arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: @@ -407,7 +415,7 @@ ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1) # If enough people need "treelang" support for it may be considered. # --enable-languages=ada,c,c++,fortran,java,objc,treelang # I think it's incorrect to include this option (as it'll end up set - # to i486 on x86 platforms), and we want to tune the binary structure + # to i586 on x86 platforms), and we want to tune the binary structure # for i686, as that's where almost all of the optimization speedups # are to be found. # Correct me if my take on this is wrong. @@ -557,6 +565,9 @@ rm -f $PKG1/usr/lib/libgcj-tools.a ln -sf gfortran-gcc-$VERSION ${TARGET}-g77 ln -sf gfortran g77 ln -sf gfortran f77 + cat $CWD/c89.sh > c89 + cat $CWD/c99.sh > c99 + chmod 755 c89 c99 ) ( cd $PKG1/usr/man -- cgit v1.2.3