summaryrefslogtreecommitdiff
path: root/source/d/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/gcc')
-rw-r--r--source/d/gcc/c89.sh10
-rw-r--r--source/d/gcc/c99.sh10
-rw-r--r--source/d/gcc/ecj-4.5.jarbin1470676 -> 0 bytes
-rw-r--r--source/d/gcc/ecj-4.9.jarbin0 -> 1619429 bytes
-rw-r--r--source/d/gcc/ecj.url1
-rw-r--r--source/d/gcc/gcc.66782.diff124
-rw-r--r--source/d/gcc/gcc.69140.diff13
-rwxr-xr-xsource/d/gcc/gcc.SlackBuild47
-rw-r--r--source/d/gcc/slack-desc.gcc4
-rw-r--r--source/d/gcc/slack-desc.gcc-gnat8
10 files changed, 196 insertions, 21 deletions
diff --git a/source/d/gcc/c89.sh b/source/d/gcc/c89.sh
new file mode 100644
index 00000000..35486ea8
--- /dev/null
+++ b/source/d/gcc/c89.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+fl="-std=c89"
+for opt; do
+ case "$opt" in
+ -ansi|-std=c89|-std=iso9899:1990) fl="";;
+ -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2
+ exit 1;;
+ esac
+done
+exec gcc $fl ${1+"$@"}
diff --git a/source/d/gcc/c99.sh b/source/d/gcc/c99.sh
new file mode 100644
index 00000000..88dd8064
--- /dev/null
+++ b/source/d/gcc/c99.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+fl="-std=c99"
+for opt; do
+ case "$opt" in
+ -std=c99|-std=iso9899:1999) fl="";;
+ -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2
+ exit 1;;
+ esac
+done
+exec gcc $fl ${1+"$@"}
diff --git a/source/d/gcc/ecj-4.5.jar b/source/d/gcc/ecj-4.5.jar
deleted file mode 100644
index 8d5ed17a..00000000
--- a/source/d/gcc/ecj-4.5.jar
+++ /dev/null
Binary files differ
diff --git a/source/d/gcc/ecj-4.9.jar b/source/d/gcc/ecj-4.9.jar
new file mode 100644
index 00000000..29dc442f
--- /dev/null
+++ b/source/d/gcc/ecj-4.9.jar
Binary files differ
diff --git a/source/d/gcc/ecj.url b/source/d/gcc/ecj.url
new file mode 100644
index 00000000..9a28b2ce
--- /dev/null
+++ b/source/d/gcc/ecj.url
@@ -0,0 +1 @@
+ftp://sourceware.org/pub/java/ecj-4.9.jar
diff --git a/source/d/gcc/gcc.66782.diff b/source/d/gcc/gcc.66782.diff
new file mode 100644
index 00000000..0743f885
--- /dev/null
+++ b/source/d/gcc/gcc.66782.diff
@@ -0,0 +1,124 @@
+Index: config/i386/i386.md
+===================================================================
+--- config/i386/i386.md (revision 225539)
++++ config/i386/i386.md (working copy)
+@@ -108,6 +108,7 @@
+ UNSPEC_LD_MPIC ; load_macho_picbase
+ UNSPEC_TRUNC_NOOP
+ UNSPEC_DIV_ALREADY_SPLIT
++ UNSPEC_MS_TO_SYSV_CALL
+ UNSPEC_PAUSE
+ UNSPEC_LEA_ADDR
+ UNSPEC_XBEGIN_ABORT
+@@ -11584,6 +11585,15 @@
+ "* return ix86_output_call_insn (insn, operands[0]);"
+ [(set_attr "type" "call")])
+
++(define_insn "*call_rex64_ms_sysv"
++ [(match_parallel 2 "call_rex64_ms_sysv_operation"
++ [(call (mem:QI (match_operand:DI 0 "call_insn_operand" "rBwBz"))
++ (match_operand 1))
++ (unspec [(const_int 0)] UNSPEC_MS_TO_SYSV_CALL)])]
++ "TARGET_64BIT && !SIBLING_CALL_P (insn)"
++ "* return ix86_output_call_insn (insn, operands[0]);"
++ [(set_attr "type" "call")])
++
+ (define_insn "*sibcall"
+ [(call (mem:QI (match_operand:W 0 "sibcall_insn_operand" "UBsBz"))
+ (match_operand 1))]
+@@ -11808,6 +11818,16 @@
+ (match_dup 3)))
+ (unspec [(const_int 0)] UNSPEC_PEEPSIB)])])
+
++(define_insn "*call_value_rex64_ms_sysv"
++ [(match_parallel 3 "call_rex64_ms_sysv_operation"
++ [(set (match_operand 0)
++ (call (mem:QI (match_operand:DI 1 "call_insn_operand" "rBwBz"))
++ (match_operand 2)))
++ (unspec [(const_int 0)] UNSPEC_MS_TO_SYSV_CALL)])]
++ "TARGET_64BIT && !SIBLING_CALL_P (insn)"
++ "* return ix86_output_call_insn (insn, operands[1]);"
++ [(set_attr "type" "callv")])
++
+ (define_expand "call_value_pop"
+ [(parallel [(set (match_operand 0)
+ (call (match_operand:QI 1)
+Index: config/i386/predicates.md
+===================================================================
+--- config/i386/predicates.md (revision 225533)
++++ config/i386/predicates.md (working copy)
+@@ -616,6 +616,36 @@
+ && XINT (XEXP (op, 0), 1) == UNSPEC_GOTPCREL);
+ })
+
++;; Return true if OP is a call from MS ABI to SYSV ABI function.
++(define_predicate "call_rex64_ms_sysv_operation"
++ (match_code "parallel")
++{
++ unsigned creg_size = ARRAY_SIZE (x86_64_ms_sysv_extra_clobbered_registers);
++ unsigned i;
++
++ if ((unsigned) XVECLEN (op, 0) != creg_size + 2)
++ return false;
++
++ for (i = 0; i < creg_size; i++)
++ {
++ rtx elt = XVECEXP (op, 0, i+2);
++ enum machine_mode mode;
++ unsigned regno;
++
++ if (GET_CODE (elt) != CLOBBER
++ || GET_CODE (SET_DEST (elt)) != REG)
++ return false;
++
++ regno = x86_64_ms_sysv_extra_clobbered_registers[i];
++ mode = SSE_REGNO_P (regno) ? TImode : DImode;
++
++ if (GET_MODE (SET_DEST (elt)) != mode
++ || REGNO (SET_DEST (elt)) != regno)
++ return false;
++ }
++ return true;
++})
++
+ ;; Match exactly zero.
+ (define_predicate "const0_operand"
+ (match_code "const_int,const_wide_int,const_double,const_vector")
+Index: config/i386/i386.c
+===================================================================
+--- config/i386/i386.c (revision 225533)
++++ config/i386/i386.c (working copy)
+@@ -25639,7 +25639,9 @@
+ rtx callarg2,
+ rtx pop, bool sibcall)
+ {
+- rtx vec[3];
++ unsigned int const cregs_size
++ = ARRAY_SIZE (x86_64_ms_sysv_extra_clobbered_registers);
++ rtx vec[3 + cregs_size];
+ rtx use = NULL, call;
+ unsigned int vec_len = 0;
+
+@@ -25742,16 +25744,18 @@
+ if (TARGET_64BIT_MS_ABI
+ && (!callarg2 || INTVAL (callarg2) != -2))
+ {
+- int const cregs_size
+- = ARRAY_SIZE (x86_64_ms_sysv_extra_clobbered_registers);
+- int i;
++ unsigned i;
+
++ vec[vec_len++] = gen_rtx_UNSPEC (VOIDmode, gen_rtvec (1, const0_rtx),
++ UNSPEC_MS_TO_SYSV_CALL);
++
+ for (i = 0; i < cregs_size; i++)
+ {
+ int regno = x86_64_ms_sysv_extra_clobbered_registers[i];
+ machine_mode mode = SSE_REGNO_P (regno) ? TImode : DImode;
+
+- clobber_reg (&use, gen_rtx_REG (mode, regno));
++ vec[vec_len++]
++ = gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (mode, regno));
+ }
+ }
+
diff --git a/source/d/gcc/gcc.69140.diff b/source/d/gcc/gcc.69140.diff
new file mode 100644
index 00000000..ace60ebd
--- /dev/null
+++ b/source/d/gcc/gcc.69140.diff
@@ -0,0 +1,13 @@
+--- ./gcc/config/i386/i386.c.orig 2015-11-18 09:45:26.000000000 -0600
++++ ./gcc/config/i386/i386.c 2016-02-05 13:50:07.202981920 -0600
+@@ -9677,6 +9677,10 @@
+ if (TARGET_64BIT_MS_ABI && get_frame_size () > SEH_MAX_FRAME_SIZE)
+ return true;
+
++ /* SSE saves require frame-pointer when stack is misaligned. */
++ if (TARGET_64BIT_MS_ABI && ix86_incoming_stack_boundary < 128)
++ return true;
++
+ /* In ix86_option_override_internal, TARGET_OMIT_LEAF_FRAME_POINTER
+ turns off the frame pointer by default. Turn it back on now if
+ we've not got a leaf function. */
diff --git a/source/d/gcc/gcc.SlackBuild b/source/d/gcc/gcc.SlackBuild
index cb96a231..f23ed521 100755
--- a/source/d/gcc/gcc.SlackBuild
+++ b/source/d/gcc/gcc.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 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -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:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
# How many jobs to run in parallel:
NUMJOBS=" -j 7 "
@@ -54,8 +62,8 @@ NUMJOBS=" -j 7 "
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
@@ -137,13 +145,14 @@ cat $CWD/slack-desc.gcc-go > $PKG8/install/slack-desc
cd $TMP
tar xvf $CWD/gcc-$VERSION.tar.?z*
-#( cd gcc-$VERSION
-# If we had any patches, we would apply them here, but we're .diff free now.
-#) || exit 1
+( cd gcc-$VERSION/gcc
+ zcat $CWD/gcc.66782.diff.gz | patch -p0 --verbose || exit 1
+ zcat $CWD/gcc.69140.diff.gz | patch -p2 --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
-cp $CWD/ecj-4.5.jar gcc-$VERSION/ecj.jar
+cp $CWD/ecj-4.9.jar gcc-$VERSION/ecj.jar
# Use an antlr runtime to compile javadoc.
# The runtime can be obtained from:
@@ -393,7 +402,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.
@@ -405,6 +414,9 @@ ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1)
GCC_ARCHOPTS="--disable-multilib"
fi
+ # NOTE: For Slackware 15.0, look into removing --with-default-libstdcxx-abi=gcc4-compatible,
+ # which will then require rebuilding all C++ libraries. That is, if there's any benefit.
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
../gcc-$VERSION/configure --prefix=/usr \
@@ -419,10 +431,13 @@ ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1)
--enable-objc-gc \
--with-system-zlib \
--with-python-dir=/lib$LIBDIRSUFFIX/python2.7/site-packages \
+ --enable-libstdcxx-dual-abi \
+ --with-default-libstdcxx-abi=gcc4-compatible \
--disable-libunwind-exceptions \
--enable-__cxa_atexit \
--enable-libssp \
--enable-lto \
+ --disable-install-libiberty \
--with-gnu-ld \
--verbose \
--enable-java-home \
@@ -489,10 +504,6 @@ chmod 755 $PKG1/usr/lib${LIBDIRSUFFIX}/libgcc_s.so.1
rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/libgcj.a
rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/libgcj-tools.a
-# This is provided by binutils, so delete it here:
-rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/libiberty.a
-rm -f $PKG1/usr/lib/libiberty.a # catch-all
-
# Fix stuff up:
( cd $PKG1/usr/info ; rm dir ; gzip -9 * )
( cd $PKG1
@@ -528,6 +539,9 @@ rm -f $PKG1/usr/lib/libiberty.a # catch-all
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
@@ -735,19 +749,22 @@ mv $PKG1/usr/bin/gnative2ascii $PKG5/usr/bin
( cd $PKG8
mkdir -p usr/bin
mv $PKG1/usr/bin/*gccgo* usr/bin
+ mv $PKG1/usr/bin/go{,fmt} usr/bin
mkdir -p usr/libexec/gcc/$TARGET/$VERSION
- mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/go1 usr/libexec/gcc/$TARGET/$VERSION/go1
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/{cgo,go1} usr/libexec/gcc/$TARGET/$VERSION
mkdir -p usr/info
mv $PKG1/usr/info/gccgo.info.gz usr/info
mkdir -p usr/lib${LIBDIRSUFFIX}
mv $PKG1/usr/lib${LIBDIRSUFFIX}/go usr/lib${LIBDIRSUFFIX}
- mv $PKG1/usr/lib${LIBDIRSUFFIX}/{libgo.la,libgo.so*,libgobegin.a} usr/lib${LIBDIRSUFFIX} || exit 1
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/{libgo.la,libgo.so*,libgobegin.a,libgolibbegin.a,libnetgo.a} usr/lib${LIBDIRSUFFIX} || exit 1
# Ordinarily Slackware doesn't package static libraries, but in this case
# it is useful for deploying compiled binaries on machines that do not yet
# have libgo.so.0.0.0.
mv $PKG1/usr/lib${LIBDIRSUFFIX}/libgo.a usr/lib${LIBDIRSUFFIX}
mkdir -p usr/man/man1
mv $PKG1/usr/man/man1/gccgo.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/go.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gofmt.1.gz usr/man/man1
) || exit 1
# Filter all .la files (thanks much to Mark Post for the sed script):
diff --git a/source/d/gcc/slack-desc.gcc b/source/d/gcc/slack-desc.gcc
index 1f842675..72e33b46 100644
--- a/source/d/gcc/slack-desc.gcc
+++ b/source/d/gcc/slack-desc.gcc
@@ -11,8 +11,8 @@ gcc:
gcc: GCC is the GNU Compiler Collection.
gcc:
gcc: This package contains those parts of the compiler collection needed to
-gcc: compile C code. Other packages add C++, Fortran, Go, Objective-C, and
-gcc: Java support to the compiler core.
+gcc: compile C code. Other packages add Ada, C++, Fortran, Go,
+gcc: Objective-C, and Java support to the compiler core.
gcc:
gcc:
gcc:
diff --git a/source/d/gcc/slack-desc.gcc-gnat b/source/d/gcc/slack-desc.gcc-gnat
index ca2da571..9aa4b3c4 100644
--- a/source/d/gcc/slack-desc.gcc-gnat
+++ b/source/d/gcc/slack-desc.gcc-gnat
@@ -8,12 +8,12 @@
|-----handy-ruler------------------------------------------------------|
gcc-gnat: gcc-gnat (Ada support for GCC)
gcc-gnat:
-gcc-gnat: Ada 95 support for the GNU Compiler Collection.
+gcc-gnat: Ada support for the GNU Compiler Collection.
gcc-gnat:
gcc-gnat: This package contains those parts of the compiler collection needed to
-gcc-gnat: compile Ada 95 code. Ada95 is the object oriented successor to the
-gcc-gnat: Ada83 language. The base gcc package is also required.
-gcc-gnat:
+gcc-gnat: compile Ada code. GNAT implements Ada 95, Ada 2005 and Ada 2012, and
+gcc-gnat: it may also be invoked in Ada 83 compatibility mode. By default, GNAT
+gcc-gnat: assumes Ada 2012. The base gcc package is also required.
gcc-gnat:
gcc-gnat:
gcc-gnat: