Bump buidlroot version to 2018.02.6
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
From 765527ad3725c5f3e82ab2b8e5031120b409983d Mon Sep 17 00:00:00 2001
|
||||
From: marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Fri, 15 Jun 2018 08:51:28 +0000
|
||||
Subject: [PATCH] Partial backport r256656
|
||||
|
||||
2018-06-15 Martin Liska <mliska@suse.cz>
|
||||
|
||||
Backport from mainline
|
||||
2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
|
||||
|
||||
* lex.c (search_line_fast): Remove illegal coercion of an
|
||||
unaligned pointer value to vector pointer type and replace with
|
||||
use of __builtin_vec_vsx_ld () built-in function, which operates
|
||||
on unaligned pointer values.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@261621 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
||||
---
|
||||
libcpp/lex.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libcpp/lex.c b/libcpp/lex.c
|
||||
index e5a0397f3099..b789686f1c49 100644
|
||||
--- a/libcpp/lex.c
|
||||
+++ b/libcpp/lex.c
|
||||
@@ -568,7 +568,7 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
|
||||
{
|
||||
vc m_nl, m_cr, m_bs, m_qm;
|
||||
|
||||
- data = *((const vc *)s);
|
||||
+ data = __builtin_vec_vsx_ld (0, s);
|
||||
s += 16;
|
||||
|
||||
m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
|
||||
--
|
||||
2.17.1
|
||||
|
||||
15
bsp/buildroot/package/gcc/6.4.0/100-uclibc-conf.patch
Normal file
15
bsp/buildroot/package/gcc/6.4.0/100-uclibc-conf.patch
Normal file
@@ -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
|
||||
13
bsp/buildroot/package/gcc/6.4.0/301-missing-execinfo_h.patch
Normal file
13
bsp/buildroot/package/gcc/6.4.0/301-missing-execinfo_h.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
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
|
||||
@@ -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.
|
||||
15
bsp/buildroot/package/gcc/6.4.0/830-arm_unbreak_armv4t.patch
Normal file
15
bsp/buildroot/package/gcc/6.4.0/830-arm_unbreak_armv4t.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
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. */
|
||||
@@ -0,0 +1,69 @@
|
||||
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
|
||||
|
||||
56
bsp/buildroot/package/gcc/6.4.0/860-cilk-wchar.patch
Normal file
56
bsp/buildroot/package/gcc/6.4.0/860-cilk-wchar.patch
Normal file
@@ -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)
|
||||
@@ -0,0 +1,31 @@
|
||||
From 3bc2ee6886f1619bc6a2257a0775142526b1a57a Mon Sep 17 00:00:00 2001
|
||||
From: jcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Mon, 11 Sep 2017 21:53:38 +0000
|
||||
Subject: [PATCH] xtensa: fix PR target/82181
|
||||
|
||||
2017-09-11 Max Filippov <jcmvbkbc@gmail.com>
|
||||
gcc/
|
||||
Backport from mainline
|
||||
* config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
|
||||
words of DImode object are reachable by xtensa_uimm8x4 access.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
gcc/config/xtensa/xtensa.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
|
||||
index 2bdf5ccef979..92fdeb08046d 100644
|
||||
--- a/gcc/config/xtensa/xtensa.c
|
||||
+++ b/gcc/config/xtensa/xtensa.c
|
||||
@@ -601,6 +601,7 @@ xtensa_mem_offset (unsigned v, machine_mode mode)
|
||||
case HImode:
|
||||
return xtensa_uimm8x2 (v);
|
||||
|
||||
+ case DImode:
|
||||
case DFmode:
|
||||
return (xtensa_uimm8x4 (v) && xtensa_uimm8x4 (v + 4));
|
||||
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
From 87fda0741d210727672cba5e54a37a189e8ac04e Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Sun, 17 Jun 2018 21:18:39 -0700
|
||||
Subject: [PATCH] xtensa: fix PR target/65416
|
||||
|
||||
The issue is caused by reordering of stack pointer update after stack
|
||||
space allocation with instructions that write to the allocated stack
|
||||
space. In windowed ABI register spill area for the previous call frame
|
||||
is located just below the stack pointer and may be reloaded back into
|
||||
the register file on movsp.
|
||||
Implement allocate_stack pattern for windowed ABI configuration and
|
||||
insert an instruction that prevents reordering of frame memory access
|
||||
and stack pointer update.
|
||||
|
||||
gcc/
|
||||
2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
|
||||
|
||||
* config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
|
||||
constant.
|
||||
(allocate_stack, frame_blockage, *frame_blockage): New patterns.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Backported from: r261755
|
||||
---
|
||||
gcc/config/xtensa/xtensa.md | 46 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 46 insertions(+)
|
||||
|
||||
diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
|
||||
index 84967dbedc08..209f839cfb0f 100644
|
||||
--- a/gcc/config/xtensa/xtensa.md
|
||||
+++ b/gcc/config/xtensa/xtensa.md
|
||||
@@ -38,6 +38,7 @@
|
||||
(UNSPEC_MEMW 11)
|
||||
(UNSPEC_LSETUP_START 12)
|
||||
(UNSPEC_LSETUP_END 13)
|
||||
+ (UNSPEC_FRAME_BLOCKAGE 14)
|
||||
|
||||
(UNSPECV_SET_FP 1)
|
||||
(UNSPECV_ENTRY 2)
|
||||
@@ -1676,6 +1677,32 @@
|
||||
|
||||
;; Miscellaneous instructions.
|
||||
|
||||
+;; In windowed ABI stack pointer adjustment must happen before any access
|
||||
+;; to the space allocated on stack is allowed, otherwise register spill
|
||||
+;; area may be clobbered. That's what frame blockage is supposed to enforce.
|
||||
+
|
||||
+(define_expand "allocate_stack"
|
||||
+ [(set (match_operand 0 "nonimmed_operand")
|
||||
+ (minus (reg A1_REG) (match_operand 1 "add_operand")))
|
||||
+ (set (reg A1_REG)
|
||||
+ (minus (reg A1_REG) (match_dup 1)))]
|
||||
+ "TARGET_WINDOWED_ABI"
|
||||
+{
|
||||
+ if (CONST_INT_P (operands[1]))
|
||||
+ {
|
||||
+ rtx neg_op0 = GEN_INT (-INTVAL (operands[1]));
|
||||
+ emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, neg_op0));
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ emit_insn (gen_subsi3 (stack_pointer_rtx, stack_pointer_rtx,
|
||||
+ operands[1]));
|
||||
+ }
|
||||
+ emit_move_insn (operands[0], virtual_stack_dynamic_rtx);
|
||||
+ emit_insn (gen_frame_blockage ());
|
||||
+ DONE;
|
||||
+})
|
||||
+
|
||||
(define_expand "prologue"
|
||||
[(const_int 0)]
|
||||
""
|
||||
@@ -1767,6 +1794,25 @@
|
||||
[(set_attr "length" "0")
|
||||
(set_attr "type" "nop")])
|
||||
|
||||
+;; Do not schedule instructions accessing memory before this point.
|
||||
+
|
||||
+(define_expand "frame_blockage"
|
||||
+ [(set (match_dup 0)
|
||||
+ (unspec:BLK [(match_dup 1)] UNSPEC_FRAME_BLOCKAGE))]
|
||||
+ ""
|
||||
+{
|
||||
+ operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode));
|
||||
+ MEM_VOLATILE_P (operands[0]) = 1;
|
||||
+ operands[1] = stack_pointer_rtx;
|
||||
+})
|
||||
+
|
||||
+(define_insn "*frame_blockage"
|
||||
+ [(set (match_operand:BLK 0 "" "")
|
||||
+ (unspec:BLK [(match_operand:SI 1 "" "")] UNSPEC_FRAME_BLOCKAGE))]
|
||||
+ ""
|
||||
+ ""
|
||||
+ [(set_attr "length" "0")])
|
||||
+
|
||||
(define_insn "trap"
|
||||
[(trap_if (const_int 1) (const_int 0))]
|
||||
""
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 6765eecde2ed8d4be0fc217408b9e9b92a840aff Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Tue, 4 Sep 2018 00:39:32 -0700
|
||||
Subject: [PATCH] gcc: xtensa: fix NAND code in xtensa_expand_atomic
|
||||
|
||||
NAND is ~(a1 & a2), but xtensa_expand_atomic does ~a1 & a2.
|
||||
That fixes libatomic tests atomic-op-{1,2}.
|
||||
|
||||
gcc/
|
||||
2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
|
||||
|
||||
* config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
|
||||
XOR operations in NAND case.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Backported from: r264087
|
||||
---
|
||||
gcc/config/xtensa/xtensa.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
|
||||
index 7cfe64d42895..080bb4ad765d 100644
|
||||
--- a/gcc/config/xtensa/xtensa.c
|
||||
+++ b/gcc/config/xtensa/xtensa.c
|
||||
@@ -1614,9 +1614,9 @@ xtensa_expand_atomic (enum rtx_code code, rtx target, rtx mem, rtx val,
|
||||
break;
|
||||
|
||||
case MULT: /* NAND */
|
||||
- tmp = expand_simple_binop (SImode, XOR, old, ac.modemask,
|
||||
+ tmp = expand_simple_binop (SImode, AND, old, val,
|
||||
NULL_RTX, 1, OPTAB_DIRECT);
|
||||
- tmp = expand_simple_binop (SImode, AND, tmp, val,
|
||||
+ tmp = expand_simple_binop (SImode, XOR, tmp, ac.modemask,
|
||||
new_rtx, 1, OPTAB_DIRECT);
|
||||
break;
|
||||
|
||||
--
|
||||
2.11.0
|
||||
|
||||
15
bsp/buildroot/package/gcc/6.4.0/890-fix-m68k-compile.patch
Normal file
15
bsp/buildroot/package/gcc/6.4.0/890-fix-m68k-compile.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
18
bsp/buildroot/package/gcc/6.4.0/891-fix-m68k-uclinux.patch
Normal file
18
bsp/buildroot/package/gcc/6.4.0/891-fix-m68k-uclinux.patch
Normal file
@@ -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-6.1.0.orig/libgcc/config.host gcc-6.1.0/libgcc/config.host
|
||||
--- gcc-6.1.0.orig/libgcc/config.host 2016-02-26 21:02:28.000000000 +0100
|
||||
+++ gcc-6.1.0/libgcc/config.host 2016-04-29 09:18:40.377989160 +0200
|
||||
@@ -812,7 +812,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
|
||||
@@ -0,0 +1,60 @@
|
||||
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
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,59 @@
|
||||
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
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
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} \
|
||||
40
bsp/buildroot/package/gcc/6.4.0/896-microblaze-Revert.patch
Normal file
40
bsp/buildroot/package/gcc/6.4.0/896-microblaze-Revert.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From 707a69dfb56a2976e2b5c010f0e5cb2ac9905a07 Mon Sep 17 00:00:00 2001
|
||||
From: eager <eager@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Sat, 27 May 2017 18:29:40 +0000
|
||||
Subject: [PATCH] Revert: 2016-01-21 Ajit Agarwal
|
||||
<ajitkum@xilinx.com>
|
||||
|
||||
See https://gcc.gnu.org/ml/gcc/2017-05/msg00221.html.
|
||||
|
||||
* config/microblaze/microblaze.h
|
||||
(FIXED_REGISTERS): Update in macro.
|
||||
(CALL_USED_REGISTERS): Update in macro.
|
||||
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@248540 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||||
diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
|
||||
index 66e4ef5..2c9ece1 100644
|
||||
--- a/gcc/config/microblaze/microblaze.h
|
||||
+++ b/gcc/config/microblaze/microblaze.h
|
||||
@@ -269,14 +269,14 @@ extern enum pipeline_type microblaze_pipe;
|
||||
#define FIXED_REGISTERS \
|
||||
{ \
|
||||
1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, \
|
||||
- 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
|
||||
+ 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
|
||||
1, 1, 1, 1 \
|
||||
}
|
||||
|
||||
#define CALL_USED_REGISTERS \
|
||||
{ \
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
|
||||
- 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
|
||||
+ 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
|
||||
1, 1, 1, 1 \
|
||||
}
|
||||
#define GP_REG_FIRST 0
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
From 81aab124bc697a87ad492d4cd3380599c0e0747e Mon Sep 17 00:00:00 2001
|
||||
From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Fri, 6 Jan 2017 20:54:34 +0000
|
||||
Subject: [PATCH] Make MicroBlaze support DWARF EH (old Xilinx patch, needed
|
||||
for glibc build).
|
||||
|
||||
This patch, taken from
|
||||
<https://git.busybox.net/buildroot/tree/package/gcc/5.4.0/840-microblaze-enable-dwarf-eh-support.patch>
|
||||
and with a few formatting cleanups and an update for the removal of
|
||||
gen_rtx_raw_REG, enables DWARF EH support for MicroBlaze.
|
||||
|
||||
This is needed for building glibc with a compiler that includes shared
|
||||
libgcc; right now all glibc builds for MicroBlaze are failing with my
|
||||
bot for lack of this support. (It's dubious if we should have glibc
|
||||
ports at all where required support is missing in FSF GCC.)
|
||||
|
||||
Tested building glibc with build-many-glibcs.py. I have *not* done
|
||||
any other testing or any execution testing for MicroBlaze.
|
||||
|
||||
2017-01-06 Edgar E. Iglesias <edgar.iglesias@xilinx.com>
|
||||
David Holsgrove <david.holsgrove@xilinx.com>
|
||||
|
||||
* common/config/microblaze/microblaze-common.c
|
||||
(TARGET_EXCEPT_UNWIND_INFO): Remove.
|
||||
* config/microblaze/microblaze-protos.h (microblaze_eh_return):
|
||||
New prototype.
|
||||
* config/microblaze/microblaze.c (microblaze_must_save_register)
|
||||
(microblaze_expand_epilogue, microblaze_return_addr): Handle
|
||||
calls_eh_return.
|
||||
(microblaze_eh_return): New function.
|
||||
* config/microblaze/microblaze.h (RETURN_ADDR_OFFSET)
|
||||
(EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM)
|
||||
(EH_RETURN_STACKADJ_RTX, ASM_PREFERRED_EH_DATA_FORMAT): New macros.
|
||||
* config/microblaze/microblaze.md (eh_return): New pattern.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244183 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||||
---
|
||||
gcc/common/config/microblaze/microblaze-common.c | 3 ---
|
||||
gcc/config/microblaze/microblaze-protos.h | 1 +
|
||||
gcc/config/microblaze/microblaze.c | 27 ++++++++++++++++++++----
|
||||
gcc/config/microblaze/microblaze.h | 16 ++++++++++++++
|
||||
gcc/config/microblaze/microblaze.md | 10 +++++++++
|
||||
6 files changed, 66 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/gcc/common/config/microblaze/microblaze-common.c b/gcc/common/config/microblaze/microblaze-common.c
|
||||
index 57a3099..4975663 100644
|
||||
--- a/gcc/common/config/microblaze/microblaze-common.c
|
||||
+++ b/gcc/common/config/microblaze/microblaze-common.c
|
||||
@@ -37,7 +37,4 @@ static const struct default_options microblaze_option_optimization_table[] =
|
||||
#undef TARGET_OPTION_OPTIMIZATION_TABLE
|
||||
#define TARGET_OPTION_OPTIMIZATION_TABLE microblaze_option_optimization_table
|
||||
|
||||
-#undef TARGET_EXCEPT_UNWIND_INFO
|
||||
-#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info
|
||||
-
|
||||
struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
|
||||
diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h
|
||||
index 6fb3066..9ba8f2d 100644
|
||||
--- a/gcc/config/microblaze/microblaze-protos.h
|
||||
+++ b/gcc/config/microblaze/microblaze-protos.h
|
||||
@@ -57,6 +57,7 @@ extern bool microblaze_tls_referenced_p (rtx);
|
||||
extern int symbol_mentioned_p (rtx);
|
||||
extern int label_mentioned_p (rtx);
|
||||
extern bool microblaze_cannot_force_const_mem (machine_mode, rtx);
|
||||
+extern void microblaze_eh_return (rtx op0);
|
||||
#endif /* RTX_CODE */
|
||||
|
||||
/* Declare functions in microblaze-c.c. */
|
||||
diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
|
||||
index 03b70e1..746bef1 100644
|
||||
--- a/gcc/config/microblaze/microblaze.c
|
||||
+++ b/gcc/config/microblaze/microblaze.c
|
||||
@@ -1926,6 +1926,10 @@ microblaze_must_save_register (int regno)
|
||||
if (frame_pointer_needed && (regno == HARD_FRAME_POINTER_REGNUM))
|
||||
return 1;
|
||||
|
||||
+ if (crtl->calls_eh_return
|
||||
+ && regno == MB_ABI_SUB_RETURN_ADDR_REGNUM)
|
||||
+ return 1;
|
||||
+
|
||||
if (!crtl->is_leaf)
|
||||
{
|
||||
if (regno == MB_ABI_SUB_RETURN_ADDR_REGNUM)
|
||||
@@ -1953,6 +1957,11 @@ microblaze_must_save_register (int regno)
|
||||
return 1;
|
||||
}
|
||||
|
||||
+ if (crtl->calls_eh_return
|
||||
+ && (regno == EH_RETURN_DATA_REGNO (0)
|
||||
+ || regno == EH_RETURN_DATA_REGNO (1)))
|
||||
+ return 1;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3029,6 +3038,12 @@ microblaze_expand_epilogue (void)
|
||||
emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, fsiz_rtx));
|
||||
}
|
||||
|
||||
+ if (crtl->calls_eh_return)
|
||||
+ emit_insn (gen_addsi3 (stack_pointer_rtx,
|
||||
+ stack_pointer_rtx,
|
||||
+ gen_raw_REG (SImode,
|
||||
+ MB_EH_STACKADJ_REGNUM)));
|
||||
+
|
||||
emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST +
|
||||
MB_ABI_SUB_RETURN_ADDR_REGNUM)));
|
||||
}
|
||||
@@ -3326,10 +3341,14 @@ microblaze_return_addr (int count, rtx frame ATTRIBUTE_UNUSED)
|
||||
if (count != 0)
|
||||
return NULL_RTX;
|
||||
|
||||
- return gen_rtx_PLUS (Pmode,
|
||||
- get_hard_reg_initial_val (Pmode,
|
||||
- MB_ABI_SUB_RETURN_ADDR_REGNUM),
|
||||
- GEN_INT (8));
|
||||
+ return get_hard_reg_initial_val (Pmode,
|
||||
+ MB_ABI_SUB_RETURN_ADDR_REGNUM);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+microblaze_eh_return (rtx op0)
|
||||
+{
|
||||
+ emit_insn (gen_movsi (gen_rtx_MEM (Pmode, stack_pointer_rtx), op0));
|
||||
}
|
||||
|
||||
/* Queue an .ident string in the queue of top-level asm statements.
|
||||
diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
|
||||
index 527f4d3..8fdadbf 100644
|
||||
--- a/gcc/config/microblaze/microblaze.h
|
||||
+++ b/gcc/config/microblaze/microblaze.h
|
||||
@@ -184,6 +184,22 @@ extern enum pipeline_type microblaze_pipe;
|
||||
#define INCOMING_RETURN_ADDR_RTX \
|
||||
gen_rtx_REG (Pmode, GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM)
|
||||
|
||||
+/* Specifies the offset from INCOMING_RETURN_ADDR_RTX and the actual return PC. */
|
||||
+#define RETURN_ADDR_OFFSET (8)
|
||||
+
|
||||
+/* Describe how we implement __builtin_eh_return. */
|
||||
+#define EH_RETURN_DATA_REGNO(N) \
|
||||
+ (((N) < 2) ? MB_ABI_FIRST_ARG_REGNUM + (N) : INVALID_REGNUM)
|
||||
+
|
||||
+#define MB_EH_STACKADJ_REGNUM MB_ABI_INT_RETURN_VAL2_REGNUM
|
||||
+#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, MB_EH_STACKADJ_REGNUM)
|
||||
+
|
||||
+/* Select a format to encode pointers in exception handling data. CODE
|
||||
+ is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
|
||||
+ true if the symbol may be affected by dynamic relocations. */
|
||||
+#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
|
||||
+ ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr)
|
||||
+
|
||||
/* Use DWARF 2 debugging information by default. */
|
||||
#define DWARF2_DEBUGGING_INFO
|
||||
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
|
||||
diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
|
||||
index 8f83daa..66ebc1e 100644
|
||||
--- a/gcc/config/microblaze/microblaze.md
|
||||
+++ b/gcc/config/microblaze/microblaze.md
|
||||
@@ -2324,4 +2324,14 @@
|
||||
(set_attr "mode" "SI")
|
||||
(set_attr "length" "4")])
|
||||
|
||||
+; This is used in compiling the unwind routines.
|
||||
+(define_expand "eh_return"
|
||||
+ [(use (match_operand 0 "general_operand" ""))]
|
||||
+ ""
|
||||
+ "
|
||||
+{
|
||||
+ microblaze_eh_return (operands[0]);
|
||||
+ DONE;
|
||||
+}")
|
||||
+
|
||||
(include "sync.md")
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
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-6.1.0.orig/gcc/config.gcc gcc-6.1.0/gcc/config.gcc
|
||||
--- gcc-6.1.0.orig/gcc/config.gcc 2016-04-11 12:14:59.000000000 +0200
|
||||
+++ gcc-6.1.0/gcc/config.gcc 2016-07-02 20:04:25.732169982 +0200
|
||||
@@ -833,6 +833,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*)
|
||||
@@ -0,0 +1,43 @@
|
||||
From 83717065090bb8b954556d1216dd9dc397dc0243 Mon Sep 17 00:00:00 2001
|
||||
From: nsz <nsz@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Thu, 25 Aug 2016 14:13:02 +0000
|
||||
Subject: [PATCH] [mips] Add support for mips*r6-*-musl
|
||||
|
||||
gcc/
|
||||
* config/mips/linux.h (MUSL_DYNAMIC_LINKER32): Update.
|
||||
(MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERN32): Update.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239760 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
|
||||
[Vincent: tweak to not patch ChangeLog]
|
||||
|
||||
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
|
||||
---
|
||||
gcc/config/mips/linux.h | 9 ++++++---
|
||||
1 files changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
|
||||
index fa253b6..dc51c45 100644
|
||||
--- a/gcc/config/mips/linux.h
|
||||
+++ b/gcc/config/mips/linux.h
|
||||
@@ -38,10 +38,13 @@ along with GCC; see the file COPYING3. If not see
|
||||
"%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
|
||||
|
||||
#undef MUSL_DYNAMIC_LINKER32
|
||||
-#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
+#define MUSL_DYNAMIC_LINKER32 \
|
||||
+ "/lib/ld-musl-mips%{mips32r6|mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
#undef MUSL_DYNAMIC_LINKER64
|
||||
-#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
-#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
+#define MUSL_DYNAMIC_LINKER64 \
|
||||
+ "/lib/ld-musl-mips64%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
+#define MUSL_DYNAMIC_LINKERN32 \
|
||||
+ "/lib/ld-musl-mipsn32%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
|
||||
|
||||
#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
|
||||
#define GNU_USER_DYNAMIC_LINKERN32 \
|
||||
--
|
||||
2.10.0
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
From 35d8ca22047f101a700abb29cffbf03b81278a2b Mon Sep 17 00:00:00 2001
|
||||
From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Tue, 4 Jul 2017 10:23:57 +0000
|
||||
Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
|
||||
|
||||
Current glibc no longer gives the ucontext_t type the tag struct
|
||||
ucontext, to conform with POSIX namespace rules. This requires
|
||||
various linux-unwind.h files in libgcc, that were previously using
|
||||
struct ucontext, to be fixed to use ucontext_t instead. This is
|
||||
similar to the removal of the struct siginfo tag from siginfo_t some
|
||||
years ago.
|
||||
|
||||
This patch changes those files to use ucontext_t instead. As the
|
||||
standard name that should be unconditionally safe, so this is not
|
||||
restricted to architectures supported by glibc, or conditioned on the
|
||||
glibc version.
|
||||
|
||||
Tested compilation together with current glibc with glibc's
|
||||
build-many-glibcs.py.
|
||||
|
||||
* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
|
||||
config/alpha/linux-unwind.h (alpha_fallback_frame_state),
|
||||
config/bfin/linux-unwind.h (bfin_fallback_frame_state),
|
||||
config/i386/linux-unwind.h (x86_64_fallback_frame_state,
|
||||
x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
|
||||
uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
|
||||
config/pa/linux-unwind.h (pa32_fallback_frame_state),
|
||||
config/sh/linux-unwind.h (sh_fallback_frame_state),
|
||||
config/tilepro/linux-unwind.h (tile_fallback_frame_state),
|
||||
config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
|
||||
ucontext_t instead of struct ucontext.
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@249957 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
|
||||
(cherry picked from commit b685411208e0aaa79190d54faf945763514706b8)
|
||||
[Romain rebase on gcc 6.4]
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
libgcc/config/aarch64/linux-unwind.h | 2 +-
|
||||
libgcc/config/alpha/linux-unwind.h | 2 +-
|
||||
libgcc/config/bfin/linux-unwind.h | 2 +-
|
||||
libgcc/config/i386/linux-unwind.h | 4 ++--
|
||||
libgcc/config/m68k/linux-unwind.h | 2 +-
|
||||
libgcc/config/nios2/linux-unwind.h | 2 +-
|
||||
libgcc/config/pa/linux-unwind.h | 2 +-
|
||||
libgcc/config/sh/linux-unwind.h | 2 +-
|
||||
libgcc/config/tilepro/linux-unwind.h | 2 +-
|
||||
libgcc/config/xtensa/linux-unwind.h | 2 +-
|
||||
10 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
|
||||
index 4512efb..06de45a 100644
|
||||
--- a/libgcc/config/aarch64/linux-unwind.h
|
||||
+++ b/libgcc/config/aarch64/linux-unwind.h
|
||||
@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct rt_sigframe
|
||||
{
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
};
|
||||
|
||||
struct rt_sigframe *rt_;
|
||||
diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
|
||||
index bdbba4a..e84812e 100644
|
||||
--- a/libgcc/config/alpha/linux-unwind.h
|
||||
+++ b/libgcc/config/alpha/linux-unwind.h
|
||||
@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
|
||||
{
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
sc = &rt_->uc.uc_mcontext;
|
||||
}
|
||||
diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
|
||||
index 77b7c23..8bf5e82 100644
|
||||
--- a/libgcc/config/bfin/linux-unwind.h
|
||||
+++ b/libgcc/config/bfin/linux-unwind.h
|
||||
@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
|
||||
void *puc;
|
||||
char retcode[8];
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
|
||||
index 540a0a2..29efbe3 100644
|
||||
--- a/libgcc/config/i386/linux-unwind.h
|
||||
+++ b/libgcc/config/i386/linux-unwind.h
|
||||
@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
|
||||
if (*(unsigned char *)(pc+0) == 0x48
|
||||
&& *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
|
||||
{
|
||||
- struct ucontext *uc_ = context->cfa;
|
||||
+ ucontext_t *uc_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
because it does not alias anything. */
|
||||
@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
|
||||
siginfo_t *pinfo;
|
||||
void *puc;
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
|
||||
index 75b7cf7..f964e24 100644
|
||||
--- a/libgcc/config/m68k/linux-unwind.h
|
||||
+++ b/libgcc/config/m68k/linux-unwind.h
|
||||
@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
/* <sys/ucontext.h> is unfortunately broken right now. */
|
||||
struct uw_ucontext {
|
||||
unsigned long uc_flags;
|
||||
- struct ucontext *uc_link;
|
||||
+ ucontext_t *uc_link;
|
||||
stack_t uc_stack;
|
||||
mcontext_t uc_mcontext;
|
||||
unsigned long uc_filler[80];
|
||||
diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h
|
||||
index 2304142..30f25ea 100644
|
||||
--- a/libgcc/config/nios2/linux-unwind.h
|
||||
+++ b/libgcc/config/nios2/linux-unwind.h
|
||||
@@ -38,7 +38,7 @@ struct nios2_mcontext {
|
||||
|
||||
struct nios2_ucontext {
|
||||
unsigned long uc_flags;
|
||||
- struct ucontext *uc_link;
|
||||
+ ucontext_t *uc_link;
|
||||
stack_t uc_stack;
|
||||
struct nios2_mcontext uc_mcontext;
|
||||
sigset_t uc_sigmask; /* mask last for extensibility */
|
||||
diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
|
||||
index 9a2657f..e47493d 100644
|
||||
--- a/libgcc/config/pa/linux-unwind.h
|
||||
+++ b/libgcc/config/pa/linux-unwind.h
|
||||
@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct sigcontext *sc;
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *frame;
|
||||
|
||||
/* rt_sigreturn trampoline:
|
||||
diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
|
||||
index e389cac..0bf43ba 100644
|
||||
--- a/libgcc/config/sh/linux-unwind.h
|
||||
+++ b/libgcc/config/sh/linux-unwind.h
|
||||
@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
|
||||
{
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
|
||||
index 796e976..75f8890 100644
|
||||
--- a/libgcc/config/tilepro/linux-unwind.h
|
||||
+++ b/libgcc/config/tilepro/linux-unwind.h
|
||||
@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct rt_sigframe {
|
||||
unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_;
|
||||
|
||||
/* Return if this is not a signal handler. */
|
||||
diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
|
||||
index 9872492..586a9d4 100644
|
||||
--- a/libgcc/config/xtensa/linux-unwind.h
|
||||
+++ b/libgcc/config/xtensa/linux-unwind.h
|
||||
@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
|
||||
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_;
|
||||
|
||||
/* movi a2, __NR_rt_sigreturn; syscall */
|
||||
--
|
||||
2.9.5
|
||||
|
||||
91
bsp/buildroot/package/gcc/6.4.0/943-sanitizer-linux.patch
Normal file
91
bsp/buildroot/package/gcc/6.4.0/943-sanitizer-linux.patch
Normal file
@@ -0,0 +1,91 @@
|
||||
From a3e3d1b5f73380a99126c4937a95225ba3bd214b Mon Sep 17 00:00:00 2001
|
||||
From: doko <doko@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Thu, 7 Sep 2017 07:15:24 +0000
|
||||
Subject: [PATCH] 2017-09-07 Matthias Klose <doko@ubuntu.com>
|
||||
|
||||
Backported from mainline
|
||||
2017-07-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR sanitizer/81066
|
||||
* sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969.
|
||||
* sanitizer_common/sanitizer_linux.cc: Likewise.
|
||||
* sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise.
|
||||
* tsan/tsan_platform_linux.cc: Likewise.
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@251828 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
|
||||
(cherry picked from commit 8937b94d1a643fd9760714642296d034a45254a8)
|
||||
[Romain rebase on gcc 6.4]
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
libsanitizer/sanitizer_common/sanitizer_linux.cc | 3 +--
|
||||
libsanitizer/sanitizer_common/sanitizer_linux.h | 4 +---
|
||||
libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc | 2 +-
|
||||
libsanitizer/tsan/tsan_platform_linux.cc | 2 +-
|
||||
4 files changed, 4 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc
|
||||
index 2cefa20..223d9c6 100644
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc
|
||||
@@ -546,8 +546,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
|
||||
}
|
||||
#endif
|
||||
|
||||
-uptr internal_sigaltstack(const struct sigaltstack *ss,
|
||||
- struct sigaltstack *oss) {
|
||||
+uptr internal_sigaltstack(const void *ss, void *oss) {
|
||||
return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
|
||||
}
|
||||
|
||||
diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h
|
||||
index 4497702..1594058 100644
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_linux.h
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_linux.h
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "sanitizer_platform_limits_posix.h"
|
||||
|
||||
struct link_map; // Opaque type returned by dlopen().
|
||||
-struct sigaltstack;
|
||||
|
||||
namespace __sanitizer {
|
||||
// Dirent structure for getdents(). Note that this structure is different from
|
||||
@@ -28,8 +27,7 @@ struct linux_dirent;
|
||||
|
||||
// Syscall wrappers.
|
||||
uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
|
||||
-uptr internal_sigaltstack(const struct sigaltstack* ss,
|
||||
- struct sigaltstack* oss);
|
||||
+uptr internal_sigaltstack(const void* ss, void* oss);
|
||||
uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
|
||||
__sanitizer_sigset_t *oldset);
|
||||
void internal_sigfillset(__sanitizer_sigset_t *set);
|
||||
diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
|
||||
index c919e4f..014162af 100644
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
|
||||
@@ -267,7 +267,7 @@ static int TracerThread(void* argument) {
|
||||
|
||||
// Alternate stack for signal handling.
|
||||
InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
|
||||
- struct sigaltstack handler_stack;
|
||||
+ stack_t handler_stack;
|
||||
internal_memset(&handler_stack, 0, sizeof(handler_stack));
|
||||
handler_stack.ss_sp = handler_stack_memory.data();
|
||||
handler_stack.ss_size = kHandlerStackSize;
|
||||
diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
|
||||
index 09cec5f..908f4fe 100644
|
||||
--- a/libsanitizer/tsan/tsan_platform_linux.cc
|
||||
+++ b/libsanitizer/tsan/tsan_platform_linux.cc
|
||||
@@ -291,7 +291,7 @@ bool IsGlobalVar(uptr addr) {
|
||||
int ExtractResolvFDs(void *state, int *fds, int nfd) {
|
||||
#if SANITIZER_LINUX
|
||||
int cnt = 0;
|
||||
- __res_state *statp = (__res_state*)state;
|
||||
+ struct __res_state *statp = (struct __res_state*)state;
|
||||
for (int i = 0; i < MAXNS && cnt < nfd; i++) {
|
||||
if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
|
||||
fds[cnt++] = statp->_u._ext.nssocks[i];
|
||||
--
|
||||
2.9.5
|
||||
|
||||
Reference in New Issue
Block a user