Remove GCC 6.2.0

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
This commit is contained in:
Alastair D'Silva 2017-01-06 12:00:32 +11:00
parent 36e8567167
commit e427a6408f
21 changed files with 0 additions and 2964 deletions

View File

@ -76,11 +76,6 @@ config CC_GCC_V_6_3_0
prompt "6.3.0" prompt "6.3.0"
select CC_GCC_6 select CC_GCC_6
config CC_GCC_V_6_2_0
bool
prompt "6.2.0"
select CC_GCC_6
config CC_GCC_V_5_4_0 config CC_GCC_V_5_4_0
bool bool
prompt "5.4.0" prompt "5.4.0"
@ -293,7 +288,6 @@ config CC_GCC_VERSION
# Don't remove next line # Don't remove next line
# CT_INSERT_VERSION_STRING_BELOW # CT_INSERT_VERSION_STRING_BELOW
default "6.3.0" if CC_GCC_V_6_3_0 default "6.3.0" if CC_GCC_V_6_3_0
default "6.2.0" if CC_GCC_V_6_2_0
default "5.4.0" if CC_GCC_V_5_4_0 default "5.4.0" if CC_GCC_V_5_4_0
default "linaro-5.2-2015.11-2" if CC_GCC_V_linaro_5_2 default "linaro-5.2-2015.11-2" if CC_GCC_V_linaro_5_2
default "linaro-4.9-2015.06" if CC_GCC_V_linaro_4_9 default "linaro-4.9-2015.06" if CC_GCC_V_linaro_4_9

View File

@ -1,15 +0,0 @@
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

View File

@ -1,13 +0,0 @@
Index: b/boehm-gc/include/gc.h
===================================================================
--- a/boehm-gc/include/gc.h
+++ b/boehm-gc/include/gc.h
@@ -503,7 +503,7 @@
#if defined(__linux__) || defined(__GLIBC__)
# include <features.h>
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
- && !defined(__ia64__)
+ && !defined(__ia64__) && !defined(__UCLIBC__)
# ifndef GC_HAVE_BUILTIN_BACKTRACE
# define GC_HAVE_BUILTIN_BACKTRACE
# endif

View File

@ -1,160 +0,0 @@
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;
}

View File

@ -1,11 +0,0 @@
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"

View File

@ -1,30 +0,0 @@
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.

View File

@ -1,15 +0,0 @@
http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
Index: b/gcc/config/arm/linux-eabi.h
===================================================================
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
@@ -45,7 +45,7 @@
The ARM10TDMI core is the default for armv5t, so set
SUBTARGET_CPU_DEFAULT to achieve this. */
#undef SUBTARGET_CPU_DEFAULT
-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
/* TARGET_BIG_ENDIAN_DEFAULT is set in
config.gcc for big endian configurations. */

View File

@ -1,69 +0,0 @@
From 07453188b18a2cbe815917dbb893b4ebfdd793b6 Mon Sep 17 00:00:00 2001
From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 26 Aug 2016 10:23:20 +0000
Subject: [PATCH] [ARM] PR target/70473: Reduce size of Cortex-A8 automaton
PR target/70473
* config/arm/cortex-a8-neon.md (cortex_a8_vfp_muld): Reduce
reservation duration to 15 cycles.
(cortex_a8_vfp_macs): Likewise.
(cortex_a8_vfp_macd): Likewise.
(cortex_a8_vfp_divs): Likewise.
(cortex_a8_vfp_divd): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239772
138bc75d-0d04-0410-961f-82ee72b054a4
[Backport from gcc upstream commit 79f5d5e3cd5a668d5ecb2b6b0cce80ef5706ac53.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
gcc/config/arm/cortex-a8-neon.md | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/gcc/config/arm/cortex-a8-neon.md b/gcc/config/arm/cortex-a8-neon.md
index 45f861f..b16c299 100644
--- a/gcc/config/arm/cortex-a8-neon.md
+++ b/gcc/config/arm/cortex-a8-neon.md
@@ -357,30 +357,34 @@
(eq_attr "type" "fmuls"))
"cortex_a8_vfp,cortex_a8_vfplite*11")
+;; Don't model a reservation for more than 15 cycles as this explodes the
+;; state space of the automaton for little gain. It is unlikely that the
+;; scheduler will find enough instructions to hide the full latency of the
+;; instructions.
(define_insn_reservation "cortex_a8_vfp_muld" 17
(and (eq_attr "tune" "cortexa8")
(eq_attr "type" "fmuld"))
- "cortex_a8_vfp,cortex_a8_vfplite*16")
+ "cortex_a8_vfp,cortex_a8_vfplite*15")
(define_insn_reservation "cortex_a8_vfp_macs" 21
(and (eq_attr "tune" "cortexa8")
(eq_attr "type" "fmacs,ffmas"))
- "cortex_a8_vfp,cortex_a8_vfplite*20")
+ "cortex_a8_vfp,cortex_a8_vfplite*15")
(define_insn_reservation "cortex_a8_vfp_macd" 26
(and (eq_attr "tune" "cortexa8")
(eq_attr "type" "fmacd,ffmad"))
- "cortex_a8_vfp,cortex_a8_vfplite*25")
+ "cortex_a8_vfp,cortex_a8_vfplite*15")
(define_insn_reservation "cortex_a8_vfp_divs" 37
(and (eq_attr "tune" "cortexa8")
(eq_attr "type" "fdivs, fsqrts"))
- "cortex_a8_vfp,cortex_a8_vfplite*36")
+ "cortex_a8_vfp,cortex_a8_vfplite*15")
(define_insn_reservation "cortex_a8_vfp_divd" 65
(and (eq_attr "tune" "cortexa8")
(eq_attr "type" "fdivd, fsqrtd"))
- "cortex_a8_vfp,cortex_a8_vfplite*64")
+ "cortex_a8_vfp,cortex_a8_vfplite*15")
;; Comparisons can actually take 7 cycles sometimes instead of four,
;; but given all the other instructions lumped into type=ffarith that
--
2.7.4

View File

@ -1,56 +0,0 @@
[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)

View File

@ -1,62 +0,0 @@
From d28554ee61a1ab1263274d66386e4051bca0ce05 Mon Sep 17 00:00:00 2001
From: jcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue, 18 Oct 2016 19:12:19 +0000
Subject: [PATCH] xtensa: don't use unwind-dw2-fde-dip with elf targets
Define LIB2ADDEH_XTENSA_UNWIND_DW2_FDE to unwind-dw2-fde.c in
xtensa/t-elf and to unwind-dw2-fde-dip.c in xtensa/t-linux and use
LIB2ADDEH_XTENSA_UNWIND_DW2_FDE in LIB2ADDEH definition.
This fixes build for elf target with windowed xtensa core that currently
breaks with the following error message:
unwind-dw2-fde-dip.c:36:40: fatal error: elf.h: No such file or directory
2016-10-18 Max Filippov <jcmvbkbc@gmail.com>
libgcc/
* config/xtensa/t-elf (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
definition.
* config/xtensa/t-linux (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
definition.
* config/xtensa/t-windowed (LIB2ADDEH): Use
LIB2ADDEH_XTENSA_UNWIND_DW2_FDE defined by either xtensa/t-elf
or xtensa/t-linux.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241313 138bc75d-0d04-0410-961f-82ee72b054a4
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
libgcc/config/xtensa/t-elf | 2 ++
libgcc/config/xtensa/t-linux | 2 ++
libgcc/config/xtensa/t-windowed | 2 +-
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/libgcc/config/xtensa/t-elf b/libgcc/config/xtensa/t-elf
index 59d5121..967cf9b 100644
--- a/libgcc/config/xtensa/t-elf
+++ b/libgcc/config/xtensa/t-elf
@@ -3,3 +3,5 @@ CRTSTUFF_T_CFLAGS += -mlongcalls
CRTSTUFF_T_CFLAGS_S += -mlongcalls
HOST_LIBGCC2_CFLAGS += -mlongcalls
+
+LIB2ADDEH_XTENSA_UNWIND_DW2_FDE = $(srcdir)/unwind-dw2-fde.c
diff --git a/libgcc/config/xtensa/t-linux b/libgcc/config/xtensa/t-linux
index 6f4ae89..412ecca 100644
--- a/libgcc/config/xtensa/t-linux
+++ b/libgcc/config/xtensa/t-linux
@@ -1 +1,3 @@
SHLIB_MAPFILES += $(srcdir)/config/xtensa/libgcc-glibc.ver
+
+LIB2ADDEH_XTENSA_UNWIND_DW2_FDE = $(srcdir)/unwind-dw2-fde-dip.c
diff --git a/libgcc/config/xtensa/t-windowed b/libgcc/config/xtensa/t-windowed
index a99156c..f140136 100644
--- a/libgcc/config/xtensa/t-windowed
+++ b/libgcc/config/xtensa/t-windowed
@@ -1,2 +1,2 @@
LIB2ADDEH = $(srcdir)/config/xtensa/unwind-dw2-xtensa.c \
- $(srcdir)/unwind-dw2-fde-dip.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
+ $(LIB2ADDEH_XTENSA_UNWIND_DW2_FDE) $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
--
2.1.4

View File

@ -1,318 +0,0 @@
From bdda1689faf608ad7c83b5bd2e21a236b0047579 Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Wed, 26 Oct 2016 08:02:51 +0000
Subject: [PATCH] xtensa: Fix PR target/78118
It started failing after the following commit: 32e90dc6a0cda45 ("PR
rtl-optimization/61047").
The change that made xtensa backend go ICE looks completely unrelated,
and indeed, the issue is caused by the side effect of
compute_frame_size() function call hidden in the
INITIAL_ELIMINATION_OFFSET macro. This call updates the value of the
xtensa_current_frame_size static variable, used in "return" instruction
predicate. Prior to the change the value of xtensa_current_frame_size was
set to 0 after the end of epilogue generation, which enabled the "return"
instruction for the CALL0 ABI, but after the change the additional
INITIAL_ELIMINATION_OFFSET calls make xtensa_current_frame_size non-zero
and "return" pattern unavailable.
Get rid of the global xtensa_current_frame_size and
xtensa_callee_save_size variables by moving them into the
machine_function structure. Implement predicate for the "return" pattern
as a function. Don't communicate completion of epilogue generation
through zeroing of xtensa_current_frame_size, add explicit epilogue_done
variable to the machine_function structure. Don't update stack frame
layout after the completion of reload.
2016-10-26 Max Filippov <jcmvbkbc@gmail.com>
gcc/
* config/xtensa/xtensa-protos.h
(xtensa_use_return_instruction_p): New prototype.
* config/xtensa/xtensa.c (xtensa_current_frame_size,
xtensa_callee_save_size): Remove.
(struct machine_function): Add new fields: current_frame_size,
callee_save_size, frame_laid_out and epilogue_done.
(compute_frame_size, xtensa_expand_prologue,
xtensa_expand_epilogue): Replace xtensa_callee_save_size with
cfun->machine->callee_save_size and xtensa_current_frame_size
with cfun->machine->current_frame_size.
(compute_frame_size): Update cfun->machine->frame_laid_out and
don't update frame layout after reload completion.
(xtensa_expand_epilogue): Set cfun->machine->epilogue_done
instead of zeroing xtensa_current_frame_size.
(xtensa_use_return_instruction_p): New function.
* config/xtensa/xtensa.h (xtensa_current_frame_size): Remove
declaration.
(INITIAL_ELIMINATION_OFFSET): Use return value of
compute_frame_size instead of xtensa_current_frame_size value.
* config/xtensa/xtensa.md ("return" pattern): Use new predicate
function xtensa_use_return_instruction_p instead of inline code.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
gcc/config/xtensa/xtensa-protos.h | 1 +
gcc/config/xtensa/xtensa.c | 82 ++++++++++++++++++++++++---------------
gcc/config/xtensa/xtensa.h | 6 +--
gcc/config/xtensa/xtensa.md | 2 +-
4 files changed, 55 insertions(+), 36 deletions(-)
diff --git a/gcc/config/xtensa/xtensa-protos.h b/gcc/config/xtensa/xtensa-protos.h
index f2ca526..873557f 100644
--- a/gcc/config/xtensa/xtensa-protos.h
+++ b/gcc/config/xtensa/xtensa-protos.h
@@ -68,6 +68,7 @@ extern rtx xtensa_return_addr (int, rtx);
extern void xtensa_setup_frame_addresses (void);
extern int xtensa_dbx_register_number (int);
extern long compute_frame_size (int);
+extern bool xtensa_use_return_instruction_p (void);
extern void xtensa_expand_prologue (void);
extern void xtensa_expand_epilogue (void);
extern void order_regs_for_local_alloc (void);
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index 64d089b..e49f784 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -78,11 +78,6 @@ enum internal_test
can support a given mode. */
char xtensa_hard_regno_mode_ok[(int) MAX_MACHINE_MODE][FIRST_PSEUDO_REGISTER];
-/* Current frame size calculated by compute_frame_size. */
-unsigned xtensa_current_frame_size;
-/* Callee-save area size in the current frame calculated by compute_frame_size. */
-int xtensa_callee_save_size;
-
/* Largest block move to handle in-line. */
#define LARGEST_MOVE_RATIO 15
@@ -94,6 +89,13 @@ struct GTY(()) machine_function
bool vararg_a7;
rtx vararg_a7_copy;
rtx_insn *set_frame_ptr_insn;
+ /* Current frame size calculated by compute_frame_size. */
+ unsigned current_frame_size;
+ /* Callee-save area size in the current frame calculated by
+ compute_frame_size. */
+ int callee_save_size;
+ bool frame_laid_out;
+ bool epilogue_done;
};
/* Vector, indexed by hard register number, which contains 1 for a
@@ -2628,24 +2630,29 @@ compute_frame_size (int size)
{
int regno;
+ if (reload_completed && cfun->machine->frame_laid_out)
+ return cfun->machine->current_frame_size;
+
/* Add space for the incoming static chain value. */
if (cfun->static_chain_decl != NULL)
size += (1 * UNITS_PER_WORD);
- xtensa_callee_save_size = 0;
+ cfun->machine->callee_save_size = 0;
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; ++regno)
{
if (xtensa_call_save_reg(regno))
- xtensa_callee_save_size += UNITS_PER_WORD;
+ cfun->machine->callee_save_size += UNITS_PER_WORD;
}
- xtensa_current_frame_size =
+ cfun->machine->current_frame_size =
XTENSA_STACK_ALIGN (size
- + xtensa_callee_save_size
+ + cfun->machine->callee_save_size
+ crtl->outgoing_args_size
+ (WINDOW_SIZE * UNITS_PER_WORD));
- xtensa_callee_save_size = XTENSA_STACK_ALIGN (xtensa_callee_save_size);
- return xtensa_current_frame_size;
+ cfun->machine->callee_save_size =
+ XTENSA_STACK_ALIGN (cfun->machine->callee_save_size);
+ cfun->machine->frame_laid_out = true;
+ return cfun->machine->current_frame_size;
}
@@ -2696,6 +2703,7 @@ xtensa_expand_prologue (void)
{
int regno;
HOST_WIDE_INT offset = 0;
+ int callee_save_size = cfun->machine->callee_save_size;
/* -128 is a limit of single addi instruction. */
if (total_size > 0 && total_size <= 128)
@@ -2709,7 +2717,7 @@ xtensa_expand_prologue (void)
add_reg_note (insn, REG_FRAME_RELATED_EXPR, note_rtx);
offset = total_size - UNITS_PER_WORD;
}
- else if (xtensa_callee_save_size)
+ else if (callee_save_size)
{
/* 1020 is maximal s32i offset, if the frame is bigger than that
* we move sp to the end of callee-saved save area, save and then
@@ -2717,13 +2725,13 @@ xtensa_expand_prologue (void)
if (total_size > 1024)
{
insn = emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
- GEN_INT (-xtensa_callee_save_size)));
+ GEN_INT (-callee_save_size)));
RTX_FRAME_RELATED_P (insn) = 1;
note_rtx = gen_rtx_SET (stack_pointer_rtx,
plus_constant (Pmode, stack_pointer_rtx,
- -xtensa_callee_save_size));
+ -callee_save_size));
add_reg_note (insn, REG_FRAME_RELATED_EXPR, note_rtx);
- offset = xtensa_callee_save_size - UNITS_PER_WORD;
+ offset = callee_save_size - UNITS_PER_WORD;
}
else
{
@@ -2759,13 +2767,13 @@ xtensa_expand_prologue (void)
{
rtx tmp_reg = gen_rtx_REG (Pmode, A9_REG);
emit_move_insn (tmp_reg, GEN_INT (total_size -
- xtensa_callee_save_size));
+ callee_save_size));
insn = emit_insn (gen_subsi3 (stack_pointer_rtx,
stack_pointer_rtx, tmp_reg));
RTX_FRAME_RELATED_P (insn) = 1;
note_rtx = gen_rtx_SET (stack_pointer_rtx,
plus_constant (Pmode, stack_pointer_rtx,
- xtensa_callee_save_size -
+ callee_save_size -
total_size));
add_reg_note (insn, REG_FRAME_RELATED_EXPR, note_rtx);
}
@@ -2833,21 +2841,21 @@ xtensa_expand_epilogue (void)
int regno;
HOST_WIDE_INT offset;
- if (xtensa_current_frame_size > (frame_pointer_needed ? 127 : 1024))
+ if (cfun->machine->current_frame_size > (frame_pointer_needed ? 127 : 1024))
{
rtx tmp_reg = gen_rtx_REG (Pmode, A9_REG);
- emit_move_insn (tmp_reg, GEN_INT (xtensa_current_frame_size -
- xtensa_callee_save_size));
+ emit_move_insn (tmp_reg, GEN_INT (cfun->machine->current_frame_size -
+ cfun->machine->callee_save_size));
emit_insn (gen_addsi3 (stack_pointer_rtx, frame_pointer_needed ?
hard_frame_pointer_rtx : stack_pointer_rtx,
tmp_reg));
- offset = xtensa_callee_save_size - UNITS_PER_WORD;
+ offset = cfun->machine->callee_save_size - UNITS_PER_WORD;
}
else
{
if (frame_pointer_needed)
emit_move_insn (stack_pointer_rtx, hard_frame_pointer_rtx);
- offset = xtensa_current_frame_size - UNITS_PER_WORD;
+ offset = cfun->machine->current_frame_size - UNITS_PER_WORD;
}
/* Prevent reordering of saved a0 update and loading it back from
@@ -2867,16 +2875,16 @@ xtensa_expand_epilogue (void)
}
}
- if (xtensa_current_frame_size > 0)
+ if (cfun->machine->current_frame_size > 0)
{
if (frame_pointer_needed || /* always reachable with addi */
- xtensa_current_frame_size > 1024 ||
- xtensa_current_frame_size <= 127)
+ cfun->machine->current_frame_size > 1024 ||
+ cfun->machine->current_frame_size <= 127)
{
- if (xtensa_current_frame_size <= 127)
- offset = xtensa_current_frame_size;
+ if (cfun->machine->current_frame_size <= 127)
+ offset = cfun->machine->current_frame_size;
else
- offset = xtensa_callee_save_size;
+ offset = cfun->machine->callee_save_size;
emit_insn (gen_addsi3 (stack_pointer_rtx,
stack_pointer_rtx,
@@ -2885,7 +2893,8 @@ xtensa_expand_epilogue (void)
else
{
rtx tmp_reg = gen_rtx_REG (Pmode, A9_REG);
- emit_move_insn (tmp_reg, GEN_INT (xtensa_current_frame_size));
+ emit_move_insn (tmp_reg,
+ GEN_INT (cfun->machine->current_frame_size));
emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
tmp_reg));
}
@@ -2896,11 +2905,22 @@ xtensa_expand_epilogue (void)
stack_pointer_rtx,
EH_RETURN_STACKADJ_RTX));
}
- xtensa_current_frame_size = 0;
- xtensa_callee_save_size = 0;
+ cfun->machine->epilogue_done = true;
emit_jump_insn (gen_return ());
}
+bool
+xtensa_use_return_instruction_p (void)
+{
+ if (!reload_completed)
+ return false;
+ if (TARGET_WINDOWED_ABI)
+ return true;
+ if (compute_frame_size (get_frame_size ()) == 0)
+ return true;
+ return cfun->machine->epilogue_done;
+}
+
void
xtensa_set_return_address (rtx address, rtx scratch)
{
diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
index 82e9900..58eb1b2 100644
--- a/gcc/config/xtensa/xtensa.h
+++ b/gcc/config/xtensa/xtensa.h
@@ -23,8 +23,6 @@ along with GCC; see the file COPYING3. If not see
/* External variables defined in xtensa.c. */
-extern unsigned xtensa_current_frame_size;
-
/* Macros used in the machine description to select various Xtensa
configuration options. */
#ifndef XCHAL_HAVE_MUL32_HIGH
@@ -477,14 +475,14 @@ enum reg_class
/* Specify the initial difference between the specified pair of registers. */
#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
do { \
- compute_frame_size (get_frame_size ()); \
+ long frame_size = compute_frame_size (get_frame_size ()); \
switch (FROM) \
{ \
case FRAME_POINTER_REGNUM: \
(OFFSET) = 0; \
break; \
case ARG_POINTER_REGNUM: \
- (OFFSET) = xtensa_current_frame_size; \
+ (OFFSET) = frame_size; \
break; \
default: \
gcc_unreachable (); \
diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
index db54a12..fcdb6c8 100644
--- a/gcc/config/xtensa/xtensa.md
+++ b/gcc/config/xtensa/xtensa.md
@@ -1663,7 +1663,7 @@
(define_insn "return"
[(return)
(use (reg:SI A0_REG))]
- "(TARGET_WINDOWED_ABI || !xtensa_current_frame_size) && reload_completed"
+ "xtensa_use_return_instruction_p ()"
{
return TARGET_WINDOWED_ABI ?
(TARGET_DENSITY ? "retw.n" : "retw") :
--
2.1.4

View File

@ -1,35 +0,0 @@
From a568f3a84ff41ca272301a5fcf31071143e97e0f Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Tue, 29 Nov 2016 13:09:17 -0800
Subject: [PATCH] xtensa: Fix PR target/78603
2016-11-29 Max Filippov <jcmvbkbc@gmail.com>
gcc/
* config/xtensa/xtensa.c (hwloop_optimize): Don't emit zero
overhead loop start between a call and its CALL_ARG_LOCATION
note.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
gcc/config/xtensa/xtensa.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index e49f784..70f698a 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -4158,7 +4158,10 @@ hwloop_optimize (hwloop_info loop)
entry_after = BB_END (entry_bb);
while (DEBUG_INSN_P (entry_after)
|| (NOTE_P (entry_after)
- && NOTE_KIND (entry_after) != NOTE_INSN_BASIC_BLOCK))
+ && NOTE_KIND (entry_after) != NOTE_INSN_BASIC_BLOCK
+ /* Make sure we don't split a call and its corresponding
+ CALL_ARG_LOCATION note. */
+ && NOTE_KIND (entry_after) != NOTE_INSN_CALL_ARG_LOCATION))
entry_after = PREV_INSN (entry_after);
emit_insn_after (seq, entry_after);
--
2.1.4

View File

@ -1,15 +0,0 @@
remove unused header, which breaks the toolchain building
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
diff -Nur gcc-5.3.0.orig/libgcc/config/m68k/linux-atomic.c gcc-5.3.0/libgcc/config/m68k/linux-atomic.c
--- gcc-5.3.0.orig/libgcc/config/m68k/linux-atomic.c 2015-01-05 13:33:28.000000000 +0100
+++ gcc-5.3.0/libgcc/config/m68k/linux-atomic.c 2016-03-19 09:25:07.000000000 +0100
@@ -33,7 +33,6 @@
using the kernel helper defined below. There is no support for
64-bit operations yet. */
-#include <asm/unistd.h>
#include <stdbool.h>
#ifndef __NR_atomic_cmpxchg_32

View File

@ -1,18 +0,0 @@
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

View File

@ -1,60 +0,0 @@
From ae9c3e354440c4a0f105a9eabfb2f77be085ebc1 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Thu, 18 Aug 2016 17:59:16 +0200
Subject: [PATCH] libgcc/mkmap-symver: support skip_underscore
Some platforms, such as Blackfin, have a special prefix for assembly
symbols as opposed to C symbols. For this reason, a function named
"foo()" in C will in fact be visible as a symbol called "_foo" in the
ELF binary.
The current linker version script logic in libgcc doesn't take into
account this situation properly. The Blackfin specific
libgcc/config/bfin/libgcc-glibc.ver has an additional "_" in front of
every symbol so that it matches the output of "nm" (which gets parsed to
produce the final linker version script). But due to this additional
"_", ld no longer matches with the symbols since "ld" does the matching
with the original symbol name, not the one prefixed with "_".
Due to this, none of the symbols in libgcc/config/bfin/libgcc-glibc.ver
are actually matched with symbols in libgcc. This causes all libgcc
symbols to be left as "LOCAL", which causes lots of "undefined
reference" whenever some C or C++ code that calls a function of libgcc
is compiled.
To address this, this commit introduces a "skip_underscore" variable to
the mkmap-symver script. It tells mkmap-symver to ignore the leading
underscore from the "nm" output.
Note that this new argument is different from the existing
"leading_underscore" argument, which *adds* an additional underscore to
the generated linker version script.
Having this functionality paves the way to using the generic linker
version information for Blackfin, instead of using a custom one.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
libgcc/mkmap-symver.awk | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libgcc/mkmap-symver.awk b/libgcc/mkmap-symver.awk
index 266832a..30bb179 100644
--- a/libgcc/mkmap-symver.awk
+++ b/libgcc/mkmap-symver.awk
@@ -47,7 +47,11 @@ state == "nm" && ($1 == "U" || $2 == "U") {
state == "nm" && NF == 3 {
split ($3, s, "@")
- def[s[1]] = 1;
+ if (skip_underscore)
+ symname = substr(s[1], 2);
+ else
+ symname = s[1];
+ def[symname] = 1;
sawsymbol = 1;
next;
}
--
2.7.4

View File

@ -1,59 +0,0 @@
From 9d9f97ca5d1ceba66677bf406c9b31027dc1f22e Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Fri, 19 Aug 2016 13:54:46 +0200
Subject: [PATCH] libgcc: fix DWARF compilation with FDPIC targets
The build of unwind-dw2-fde-dip.c currently fails for FDPIC targets with
the following error:
libgcc/unwind-dw2-fde-dip.c:167:31: error: storage size of 'load_base' isn't known
struct elf32_fdpic_loadaddr load_base;
This patch addresses that by defining load_base with the appropriate
type on FDPIC targets. It has been tested on FRV and Blackfin.
Fixes PR gcc/68468.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
libgcc/unwind-dw2-fde-dip.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c
index f7a1c3f..801bce8 100644
--- a/libgcc/unwind-dw2-fde-dip.c
+++ b/libgcc/unwind-dw2-fde-dip.c
@@ -124,7 +124,11 @@ static struct frame_hdr_cache_element
{
_Unwind_Ptr pc_low;
_Unwind_Ptr pc_high;
+#if defined __FRV_FDPIC__ || defined __BFIN_FDPIC__
+ struct elf32_fdpic_loadaddr load_base;
+#else
_Unwind_Ptr load_base;
+#endif
const ElfW(Phdr) *p_eh_frame_hdr;
const ElfW(Phdr) *p_dynamic;
struct frame_hdr_cache_element *link;
@@ -163,7 +167,7 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
struct unw_eh_callback_data *data = (struct unw_eh_callback_data *) ptr;
const ElfW(Phdr) *phdr, *p_eh_frame_hdr, *p_dynamic;
long n, match;
-#ifdef __FRV_FDPIC__
+#if defined __FRV_FDPIC__ || defined __BFIN_FDPIC__
struct elf32_fdpic_loadaddr load_base;
#else
_Unwind_Ptr load_base;
@@ -347,7 +351,7 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
break;
}
}
-# elif defined __FRV_FDPIC__ && defined __linux__
+# elif (defined __FRV_FDPIC__ || defined __BFIN_FDPIC__) && defined __linux__
data->dbase = load_base.got_value;
# else
# error What is DW_EH_PE_datarel base on this platform?
--
2.7.4

View File

@ -1,17 +0,0 @@
enable _REENTRANT when -lpthread is used
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
diff -Nur gcc-6.2.0.orig/gcc/config/bfin/linux.h gcc-6.2.0/gcc/config/bfin/linux.h
--- gcc-6.2.0.orig/gcc/config/bfin/linux.h 2016-01-04 15:30:50.000000000 +0100
+++ gcc-6.2.0/gcc/config/bfin/linux.h 2016-09-30 20:48:17.446636819 +0200
@@ -38,6 +38,9 @@
"%{static:--start-group} %{mfast-fp:-lbffastfp} %G %L %{static:--end-group} \
%{!static:%{mfast-fp:-lbffastfp} %G}"
+#undef CPP_SPEC
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+
#undef LINK_SPEC
#define LINK_SPEC "\
%{mfdpic: -m elf32bfinfd -z text} %{shared} %{pie} \

View File

@ -1,28 +0,0 @@
diff -ur gcc-6.2.0.orig/gcc/config/nios2/nios2.h gcc-6.2.0/gcc/config/nios2/nios2.h
--- gcc-6.2.0.orig/gcc/config/nios2/nios2.h 2016-11-29 10:27:50.364479625 -0800
+++ gcc-6.2.0/gcc/config/nios2/nios2.h 2016-11-29 10:29:55.069624746 -0800
@@ -63,11 +63,11 @@
#if TARGET_ENDIAN_DEFAULT == 0
# define ASM_SPEC "%{!meb:-EL} %{meb:-EB} %{march=*:-march=%*}"
# define LINK_SPEC_ENDIAN "%{!meb:-EL} %{meb:-EB}"
-# define MULTILIB_DEFAULTS { "EL" }
+# define MULTILIB_DEFAULTS { "mel" }
#else
# define ASM_SPEC "%{!mel:-EB} %{mel:-EL} %{march=*:-march=%*}"
# define LINK_SPEC_ENDIAN "%{!mel:-EB} %{mel:-EL}"
-# define MULTILIB_DEFAULTS { "EB" }
+# define MULTILIB_DEFAULTS { "meb" }
#endif
#define LINK_SPEC LINK_SPEC_ENDIAN \
diff -ur gcc-6.2.0.orig/gcc/config/nios2/t-nios2 gcc-6.2.0/gcc/config/nios2/t-nios2
--- gcc-6.2.0.orig/gcc/config/nios2/t-nios2 2016-11-29 10:27:50.364479625 -0800
+++ gcc-6.2.0/gcc/config/nios2/t-nios2 2016-11-29 10:29:03.517151014 -0800
@@ -22,6 +22,5 @@
# MULTILIB_DIRNAMES = nomul mulx fpu-60-1 fpu-60-2
# MULTILIB_EXCEPTIONS =
-# MULTILIB_OPTIONS += EL/EB
+# MULTILIB_OPTIONS += mel/meb
# MULTILIB_DIRNAMES += le be
-# MULTILIB_MATCHES += EL=mel EB=meb

View File

@ -1,14 +0,0 @@
disable split-stack for non-thread builds
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
diff -Nur gcc-5.3.0.orig/libgcc/config/t-stack gcc-5.3.0/libgcc/config/t-stack
--- gcc-5.3.0.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200
+++ gcc-5.3.0/libgcc/config/t-stack 2016-03-07 03:25:32.000000000 +0100
@@ -1,4 +1,6 @@
# Makefile fragment to provide generic support for -fsplit-stack.
# This should be used in config.host for any host which supports
# -fsplit-stack.
+ifeq ($(enable_threads),yes)
LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c
+endif

View File

@ -1,19 +0,0 @@
Enable POSIX threads for uClinux targets
Reported upstream:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71721
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
diff -Nur gcc-5.4.0.orig/gcc/config.gcc gcc-5.4.0/gcc/config.gcc
--- gcc-5.4.0.orig/gcc/config.gcc 2015-09-10 16:17:53.000000000 +0200
+++ gcc-5.4.0/gcc/config.gcc 2016-07-01 21:26:02.772958441 +0200
@@ -808,6 +808,9 @@
*-*-uclinux*)
extra_options="$extra_options gnu-user.opt"
use_gcc_stdint=wrap
+ case ${enable_threads} in
+ "" | yes | posix) thread_file='posix' ;;
+ esac
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
;;
*-*-rdos*)