Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #716 from stilor/gcc7
Add GCC 7.1.0
- Loading branch information
Showing
59 changed files
with
3,273 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Index: b/contrib/regression/objs-gcc.sh | ||
=================================================================== | ||
--- a/contrib/regression/objs-gcc.sh | ||
+++ b/contrib/regression/objs-gcc.sh | ||
@@ -106,6 +106,10 @@ | ||
then | ||
make all-gdb all-dejagnu all-ld || exit 1 | ||
make install-gdb install-dejagnu install-ld || exit 1 | ||
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] | ||
+ then | ||
+ make all-gdb all-dejagnu all-ld || exit 1 | ||
+ make install-gdb install-dejagnu install-ld || exit 1 | ||
elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then | ||
make bootstrap || exit 1 | ||
make install || exit 1 |
14 changes: 14 additions & 0 deletions
14
patches/gcc/7.1.0/1000-libtool-leave-framework-alone.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- gcc-6.2.0/libtool-ldflags 2016-12-20 11:13:12.669668125 -0800 | ||
+++ gcc-6.2.0/libtool-ldflags 2016-12-20 11:28:34.894826286 -0800 | ||
@@ -36,6 +36,11 @@ | ||
for arg | ||
do | ||
case $arg in | ||
+ -framework) | ||
+ # libtool handles this option. It should not be prefixed with | ||
+ # -Xcompiler, as that would split it from the argument that | ||
+ # follows. | ||
+ ;; | ||
-f*|--*|-static-lib*|-shared-lib*|-B*) | ||
# Libtool does not ascribe any special meaning options | ||
# that begin with -f or with a double-dash. So, it will |
160 changes: 160 additions & 0 deletions
160
patches/gcc/7.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
diff -urN gcc-5.3.0.orig/config/gcc-plugin.m4 gcc-5.3.0/config/gcc-plugin.m4 | ||
--- gcc-5.3.0.orig/config/gcc-plugin.m4 2015-12-19 14:39:04.120734900 +0000 | ||
+++ gcc-5.3.0/config/gcc-plugin.m4 2015-12-20 01:28:45.381965300 +0000 | ||
@@ -20,6 +20,9 @@ | ||
|
||
pluginlibs= | ||
|
||
+ PICFLAG="-fPIC" | ||
+ UNDEFINEDPREAMBLE="extern int X;" | ||
+ UNDEFINEDCODE="return X == 0;" | ||
case "${host}" in | ||
*-*-darwin*) | ||
if test x$build = x$host; then | ||
@@ -30,6 +33,11 @@ | ||
export_sym_check= | ||
fi | ||
;; | ||
+ *-*-mingw*|*-*-cygwin*|*-*-msys*) | ||
+ PICFLAG="" | ||
+ UNDEFINEDPREAMBLE="" | ||
+ UNDEFINEDCODE="" | ||
+ ;; | ||
*) | ||
if test x$build = x$host; then | ||
export_sym_check="objdump${exeext} -T" | ||
@@ -81,17 +89,17 @@ | ||
case "${host}" in | ||
*-*-darwin*) | ||
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` | ||
- CFLAGS="$CFLAGS -fPIC" | ||
+ CFLAGS="$CFLAGS ${PICFLAG}" | ||
LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" | ||
;; | ||
*) | ||
- CFLAGS="$CFLAGS -fPIC" | ||
- LDFLAGS="$LDFLAGS -fPIC -shared" | ||
+ CFLAGS="$CFLAGS ${PICFLAG}" | ||
+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared" | ||
;; | ||
esac | ||
- AC_MSG_CHECKING([for -fPIC -shared]) | ||
+ AC_MSG_CHECKING([for ${PICFLAG} -shared]) | ||
AC_TRY_LINK( | ||
- [extern int X;],[return X == 0;], | ||
+ [${UNDEFINEDPREAMBLE}],[${UNDEFINEDCODE}], | ||
[AC_MSG_RESULT([yes]); have_pic_shared=yes], | ||
[AC_MSG_RESULT([no]); have_pic_shared=no]) | ||
if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then | ||
diff -urN gcc-5.3.0.orig/gcc/configure gcc-5.3.0/gcc/configure | ||
--- gcc-5.3.0.orig/gcc/configure 2015-12-19 14:40:16.893975900 +0000 | ||
+++ gcc-5.3.0/gcc/configure 2015-12-20 01:28:45.472476700 +0000 | ||
@@ -28386,6 +28386,9 @@ | ||
|
||
pluginlibs= | ||
|
||
+ PICFLAG="-fPIC" | ||
+ UNDEFINEDPREAMBLE="extern int X;" | ||
+ UNDEFINEDCODE="return X == 0;" | ||
case "${host}" in | ||
*-*-darwin*) | ||
if test x$build = x$host; then | ||
@@ -28396,6 +28399,11 @@ | ||
export_sym_check= | ||
fi | ||
;; | ||
+ *-*-mingw*|*-*-cygwin*|*-*-msys*) | ||
+ PICFLAG="" | ||
+ UNDEFINEDPREAMBLE="" | ||
+ UNDEFINEDCODE="" | ||
+ ;; | ||
*) | ||
if test x$build = x$host; then | ||
export_sym_check="objdump${exeext} -T" | ||
@@ -28508,23 +28516,23 @@ | ||
case "${host}" in | ||
*-*-darwin*) | ||
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` | ||
- CFLAGS="$CFLAGS -fPIC" | ||
+ CFLAGS="$CFLAGS ${PICFLAG}" | ||
LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" | ||
;; | ||
*) | ||
- CFLAGS="$CFLAGS -fPIC" | ||
- LDFLAGS="$LDFLAGS -fPIC -shared" | ||
+ CFLAGS="$CFLAGS ${PICFLAG}" | ||
+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared" | ||
;; | ||
esac | ||
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5 | ||
-$as_echo_n "checking for -fPIC -shared... " >&6; } | ||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5 | ||
+$as_echo_n "checking for ${PICFLAG} -shared... " >&6; } | ||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
/* end confdefs.h. */ | ||
-extern int X; | ||
+${UNDEFINEDPREAMBLE} | ||
int | ||
main () | ||
{ | ||
-return X == 0; | ||
+${UNDEFINEDCODE} | ||
; | ||
return 0; | ||
} | ||
diff -urN gcc-5.3.0.orig/libcc1/configure gcc-5.3.0/libcc1/configure | ||
--- gcc-5.3.0.orig/libcc1/configure 2015-12-19 14:40:20.855979000 +0000 | ||
+++ gcc-5.3.0/libcc1/configure 2015-12-20 01:28:45.504980900 +0000 | ||
@@ -14500,6 +14500,9 @@ | ||
|
||
pluginlibs= | ||
|
||
+ PICFLAG="-fPIC" | ||
+ UNDEFINEDPREAMBLE="extern int X;" | ||
+ UNDEFINEDCODE="return X == 0;" | ||
case "${host}" in | ||
*-*-darwin*) | ||
if test x$build = x$host; then | ||
@@ -14510,6 +14513,11 @@ | ||
export_sym_check= | ||
fi | ||
;; | ||
+ *-*-mingw*|*-*-cygwin*|*-*-msys*) | ||
+ PICFLAG="" | ||
+ UNDEFINEDPREAMBLE="" | ||
+ UNDEFINEDCODE="" | ||
+ ;; | ||
*) | ||
if test x$build = x$host; then | ||
export_sym_check="objdump${exeext} -T" | ||
@@ -14622,23 +14630,23 @@ | ||
case "${host}" in | ||
*-*-darwin*) | ||
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` | ||
- CFLAGS="$CFLAGS -fPIC" | ||
+ CFLAGS="$CFLAGS ${PICFLAG}" | ||
LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" | ||
;; | ||
*) | ||
- CFLAGS="$CFLAGS -fPIC" | ||
- LDFLAGS="$LDFLAGS -fPIC -shared" | ||
+ CFLAGS="$CFLAGS ${PICFLAG}" | ||
+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared" | ||
;; | ||
esac | ||
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5 | ||
-$as_echo_n "checking for -fPIC -shared... " >&6; } | ||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5 | ||
+$as_echo_n "checking for ${PICFLAG} -shared... " >&6; } | ||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
/* end confdefs.h. */ | ||
-extern int X; | ||
+${UNDEFINEDPREAMBLE} | ||
int | ||
main () | ||
{ | ||
-return X == 0; | ||
+${UNDEFINEDCODE} | ||
; | ||
return 0; | ||
} |
11 changes: 11 additions & 0 deletions
11
patches/gcc/7.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
diff -urN gcc-5.3.0.orig/libcc1/connection.cc gcc-5.3.0/libcc1/connection.cc | ||
--- gcc-5.3.0.orig/libcc1/connection.cc 2015-12-19 14:40:20.860479600 +0000 | ||
+++ gcc-5.3.0/libcc1/connection.cc 2015-12-20 01:31:04.346611500 +0000 | ||
@@ -21,6 +21,7 @@ | ||
#include <string> | ||
#include <unistd.h> | ||
#include <sys/types.h> | ||
+#include <sys/select.h> | ||
#include <string.h> | ||
#include <errno.h> | ||
#include "marshall.hh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Index: b/gcc/config/arm/linux-elf.h | ||
=================================================================== | ||
--- a/gcc/config/arm/linux-elf.h | ||
+++ b/gcc/config/arm/linux-elf.h | ||
@@ -60,7 +60,7 @@ | ||
%{shared:-lc} \ | ||
%{!shared:%{profile:-lc_p}%{!profile:-lc}}" | ||
|
||
-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" | ||
+#define LIBGCC_SPEC "-lgcc" | ||
|
||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
|
||
Index: b/libgcc/config/arm/t-linux | ||
=================================================================== | ||
--- a/libgcc/config/arm/t-linux | ||
+++ b/libgcc/config/arm/t-linux | ||
@@ -1,6 +1,11 @@ | ||
LIB1ASMSRC = arm/lib1funcs.S | ||
LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ | ||
- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 | ||
+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ | ||
+ _arm_addsubdf3 _arm_addsubsf3 \ | ||
+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ | ||
+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ | ||
+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ | ||
+ _arm_fixsfsi _arm_fixunssfsi | ||
|
||
# Just for these, we omit the frame pointer since it makes such a big | ||
# difference. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
[PATCH] cilk: fix build without wchar | ||
|
||
When building against uClibc with wchar support disabled, WCHAR_MIN and | ||
WCHAR_MAX are not defined leading to compilation errors. | ||
|
||
Fix it by only including the wchar code if available. | ||
|
||
Signed-off-by: Peter Korsgaard <peter@korsgaard.com> | ||
--- | ||
libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++ | ||
1 file changed, 8 insertions(+) | ||
|
||
Index: b/libcilkrts/include/cilk/reducer_min_max.h | ||
=================================================================== | ||
--- a/libcilkrts/include/cilk/reducer_min_max.h | ||
+++ b/libcilkrts/include/cilk/reducer_min_max.h | ||
@@ -3154,7 +3154,9 @@ | ||
CILK_C_REDUCER_MAX_INSTANCE(char, char, CHAR_MIN) | ||
CILK_C_REDUCER_MAX_INSTANCE(unsigned char, uchar, 0) | ||
CILK_C_REDUCER_MAX_INSTANCE(signed char, schar, SCHAR_MIN) | ||
+#ifdef WCHAR_MIN | ||
CILK_C_REDUCER_MAX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN) | ||
+#endif | ||
CILK_C_REDUCER_MAX_INSTANCE(short, short, SHRT_MIN) | ||
CILK_C_REDUCER_MAX_INSTANCE(unsigned short, ushort, 0) | ||
CILK_C_REDUCER_MAX_INSTANCE(int, int, INT_MIN) | ||
@@ -3306,7 +3308,9 @@ | ||
CILK_C_REDUCER_MAX_INDEX_INSTANCE(char, char, CHAR_MIN) | ||
CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned char, uchar, 0) | ||
CILK_C_REDUCER_MAX_INDEX_INSTANCE(signed char, schar, SCHAR_MIN) | ||
+#ifdef WCHAR_MIN | ||
CILK_C_REDUCER_MAX_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN) | ||
+#endif | ||
CILK_C_REDUCER_MAX_INDEX_INSTANCE(short, short, SHRT_MIN) | ||
CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned short, ushort, 0) | ||
CILK_C_REDUCER_MAX_INDEX_INSTANCE(int, int, INT_MIN) | ||
@@ -3432,7 +3436,9 @@ | ||
CILK_C_REDUCER_MIN_INSTANCE(char, char, CHAR_MAX) | ||
CILK_C_REDUCER_MIN_INSTANCE(unsigned char, uchar, CHAR_MAX) | ||
CILK_C_REDUCER_MIN_INSTANCE(signed char, schar, SCHAR_MAX) | ||
+#ifdef WCHAR_MAX | ||
CILK_C_REDUCER_MIN_INSTANCE(wchar_t, wchar_t, WCHAR_MAX) | ||
+#endif | ||
CILK_C_REDUCER_MIN_INSTANCE(short, short, SHRT_MAX) | ||
CILK_C_REDUCER_MIN_INSTANCE(unsigned short, ushort, USHRT_MAX) | ||
CILK_C_REDUCER_MIN_INSTANCE(int, int, INT_MAX) | ||
@@ -3584,7 +3590,9 @@ | ||
CILK_C_REDUCER_MIN_INDEX_INSTANCE(char, char, CHAR_MAX) | ||
CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned char, uchar, CHAR_MAX) | ||
CILK_C_REDUCER_MIN_INDEX_INSTANCE(signed char, schar, SCHAR_MAX) | ||
+#ifdef WCHAR_MAX | ||
CILK_C_REDUCER_MIN_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MAX) | ||
+#endif | ||
CILK_C_REDUCER_MIN_INDEX_INSTANCE(short, short, SHRT_MAX) | ||
CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned short, ushort, USHRT_MAX) | ||
CILK_C_REDUCER_MIN_INDEX_INSTANCE(int, int, INT_MAX) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
avoids internal compiler error while compiling linux-atomic.c | ||
See here: | ||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833 | ||
|
||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> | ||
|
||
diff -Nur gcc-5.3.0.orig/libgcc/config.host gcc-5.3.0/libgcc/config.host | ||
--- gcc-5.3.0.orig/libgcc/config.host 2015-10-01 14:01:18.000000000 +0200 | ||
+++ gcc-5.3.0/libgcc/config.host 2016-04-26 21:30:25.353691745 +0200 | ||
@@ -794,7 +794,7 @@ | ||
m68k*-*-openbsd*) | ||
;; | ||
m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc | ||
- tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux" | ||
+ tmake_file="$tmake_file m68k/t-floatlib" | ||
md_unwind_header=m68k/linux-unwind.h | ||
;; | ||
m68k-*-linux*) # Motorola m68k's running GNU/Linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- gcc-6.3.0/libgfortran/io/close.c.org 2017-01-17 09:43:48.395850000 +0100 | ||
+++ gcc-6.3.0/libgfortran/io/close.c 2017-01-17 09:21:05.000000000 +0100 | ||
@@ -25,6 +25,7 @@ | ||
#include "io.h" | ||
#include "unix.h" | ||
#include <limits.h> | ||
+#include <stdlib.h> | ||
|
||
typedef enum | ||
{ CLOSE_DELETE, CLOSE_KEEP, CLOSE_UNSPECIFIED } |
Oops, something went wrong.