From: Romain Naour Date: Sat, 8 Dec 2018 15:37:34 +0000 (+0100) Subject: package/gcc: bump to version 7.4.0 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=92bab9a23c4008302ad8c5634b4daa658ce3d6ba;p=buildroot.git package/gcc: bump to version 7.4.0 Remove upstream patches: 0002-fix-building-on-ppc64.patch https://github.com/gcc-mirror/gcc/commit/aa65a43516da1d48011ef621ed5988289711d99b 0003-gcc-xtensa-fix-NAND-code-in-xtensa_expand_atomic.patch https://github.com/gcc-mirror/gcc/commit/8709905244d50b9d81f85d534b21c29eb640078c 0003-xtensa-fix-PR-target-65416.patch https://github.com/gcc-mirror/gcc/commit/5dcbd70ec0a97505d6153fcbc7ef899b5a2ec7fc 0004-libsanitizer-Use-pre-computed-size.patch https://github.com/gcc-mirror/gcc/commit/61f38c64c01a15560026115a157b7021ec67bd3b 0005-gcc-xtensa-don-t-force-PIC-for-uclinux-target.patch https://github.com/gcc-mirror/gcc/commit/6ef0a00dea2564f46a568b8681d8efccb4834cda Signed-off-by: Romain Naour Signed-off-by: Peter Korsgaard --- diff --git a/package/gcc/7.3.0/0001-m68k-coldfire-pr68467.patch b/package/gcc/7.3.0/0001-m68k-coldfire-pr68467.patch deleted file mode 100644 index 629c6496e5..0000000000 --- a/package/gcc/7.3.0/0001-m68k-coldfire-pr68467.patch +++ /dev/null @@ -1,48 +0,0 @@ -Backport from upstream, see -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68467 - -Signed-off-by: Waldemar Brodkorb - -diff -Nur gcc-7.2.0.orig/gcc/config/m68k/m68k.c gcc-7.2.0/gcc/config/m68k/m68k.c ---- gcc-7.2.0.orig/gcc/config/m68k/m68k.c 2017-04-03 22:30:56.274463000 +0000 -+++ gcc-7.2.0/gcc/config/m68k/m68k.c 2018-01-27 02:16:53.779367849 +0000 -@@ -182,6 +182,8 @@ - const_tree, bool); - static bool m68k_cannot_force_const_mem (machine_mode mode, rtx x); - static bool m68k_output_addr_const_extra (FILE *, rtx); -+static machine_mode m68k_promote_function_mode (const_tree, machine_mode, -+ int *, const_tree, int); - static void m68k_init_sync_libfuncs (void) ATTRIBUTE_UNUSED; - static enum flt_eval_method - m68k_excess_precision (enum excess_precision_type); -@@ -332,6 +334,9 @@ - #undef TARGET_ATOMIC_TEST_AND_SET_TRUEVAL - #define TARGET_ATOMIC_TEST_AND_SET_TRUEVAL 128 - -+#undef TARGET_PROMOTE_FUNCTION_MODE -+#define TARGET_PROMOTE_FUNCTION_MODE m68k_promote_function_mode -+ - static const struct attribute_spec m68k_attribute_table[] = - { - /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler, -@@ -6571,4 +6576,20 @@ - return FLT_EVAL_METHOD_UNPREDICTABLE; - } - -+/* Implement TARGET_PROMOTE_FUNCTION_MODE. */ -+ -+static machine_mode -+m68k_promote_function_mode (const_tree type, machine_mode mode, -+ int *punsignedp ATTRIBUTE_UNUSED, -+ const_tree fntype ATTRIBUTE_UNUSED, -+ int for_return) -+{ -+ /* Promote libcall arguments narrower than int to match the normal C -+ ABI (for which promotions are handled via -+ TARGET_PROMOTE_PROTOTYPES). */ -+ if (type == NULL_TREE && !for_return && (mode == QImode || mode == HImode)) -+ return SImode; -+ return mode; -+} -+ - #include "gt-m68k.h" diff --git a/package/gcc/7.3.0/0002-fix-building-on-ppc64.patch b/package/gcc/7.3.0/0002-fix-building-on-ppc64.patch deleted file mode 100644 index 78a028c29a..0000000000 --- a/package/gcc/7.3.0/0002-fix-building-on-ppc64.patch +++ /dev/null @@ -1,40 +0,0 @@ -From aa65a43516da1d48011ef621ed5988289711d99b Mon Sep 17 00:00:00 2001 -From: marxin -Date: Fri, 29 Jun 2018 09:31:30 +0000 -Subject: [PATCH] Partial backport r256656 - -2018-06-29 Martin Liska - - Backport from mainline - 2018-01-10 Kelvin Nilsen - - * 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 - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@262243 138bc75d-0d04-0410-961f-82ee72b054a4 -Signed-off-by: Joel Stanley ---- - libcpp/lex.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libcpp/lex.c b/libcpp/lex.c -index 097c78002cbb..e0fb9e822c44 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 - diff --git a/package/gcc/7.3.0/0003-gcc-xtensa-fix-NAND-code-in-xtensa_expand_atomic.patch b/package/gcc/7.3.0/0003-gcc-xtensa-fix-NAND-code-in-xtensa_expand_atomic.patch deleted file mode 100644 index d62d7c1566..0000000000 --- a/package/gcc/7.3.0/0003-gcc-xtensa-fix-NAND-code-in-xtensa_expand_atomic.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 6765eecde2ed8d4be0fc217408b9e9b92a840aff Mon Sep 17 00:00:00 2001 -From: Max Filippov -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 - - * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and - XOR operations in NAND case. - -Signed-off-by: Max Filippov -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 - diff --git a/package/gcc/7.3.0/0003-xtensa-fix-PR-target-65416.patch b/package/gcc/7.3.0/0003-xtensa-fix-PR-target-65416.patch deleted file mode 100644 index 7ead575439..0000000000 --- a/package/gcc/7.3.0/0003-xtensa-fix-PR-target-65416.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 87fda0741d210727672cba5e54a37a189e8ac04e Mon Sep 17 00:00:00 2001 -From: Max Filippov -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 - - * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec - constant. - (allocate_stack, frame_blockage, *frame_blockage): New patterns. - -Signed-off-by: Max Filippov -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 - diff --git a/package/gcc/7.3.0/0004-libsanitizer-Use-pre-computed-size.patch b/package/gcc/7.3.0/0004-libsanitizer-Use-pre-computed-size.patch deleted file mode 100644 index 6e73331eae..0000000000 --- a/package/gcc/7.3.0/0004-libsanitizer-Use-pre-computed-size.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 61f38c64c01a15560026115a157b7021ec67bd3b Mon Sep 17 00:00:00 2001 -From: hjl -Date: Thu, 24 May 2018 20:21:54 +0000 -Subject: [PATCH] libsanitizer: Use pre-computed size of struct ustat for Linux - -Cherry-pick compiler-rt revision 333213: - - has been removed from glibc 2.28 by: - -commit cf2478d53ad7071e84c724a986b56fe17f4f4ca7 -Author: Adhemerval Zanella -Date: Sun Mar 18 11:28:59 2018 +0800 - - Deprecate ustat syscall interface - -This patch uses pre-computed size of struct ustat for Linux. - - PR sanitizer/85835 - * sanitizer_common/sanitizer_platform_limits_posix.cc: Don't - include for Linux. - (SIZEOF_STRUCT_USTAT): New. - (struct_ustat_sz): Use SIZEOF_STRUCT_USTAT for Linux. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@260688 138bc75d-0d04-0410-961f-82ee72b054a4 - -Downloaded from upstream commit -https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=61f38c64c01a15560026115a157b7021ec67bd3b - -Signed-off-by: Bernd Kuhls ---- - libsanitizer/ChangeLog | 8 ++++++++ - .../sanitizer_common/sanitizer_platform_limits_posix.cc | 15 +++++++++++++-- - 2 files changed, 21 insertions(+), 2 deletions(-) - -diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -index 31a5e69..8017afd 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -@@ -154,7 +154,6 @@ typedef struct user_fpregs elf_fpregset_t; - # include - #endif - #include --#include - #include - #include - #include -@@ -247,7 +246,19 @@ namespace __sanitizer { - #endif // SANITIZER_LINUX || SANITIZER_FREEBSD - - #if SANITIZER_LINUX && !SANITIZER_ANDROID -- unsigned struct_ustat_sz = sizeof(struct ustat); -+ // Use pre-computed size of struct ustat to avoid which -+ // has been removed from glibc 2.28. -+#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ -+ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \ -+ || defined(__x86_64__) -+#define SIZEOF_STRUCT_USTAT 32 -+#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \ -+ || defined(__powerpc__) || defined(__s390__) -+#define SIZEOF_STRUCT_USTAT 20 -+#else -+#error Unknown size of struct ustat -+#endif -+ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT; - unsigned struct_rlimit64_sz = sizeof(struct rlimit64); - unsigned struct_statvfs64_sz = sizeof(struct statvfs64); - #endif // SANITIZER_LINUX && !SANITIZER_ANDROID --- -2.9.3 - diff --git a/package/gcc/7.3.0/0005-gcc-xtensa-don-t-force-PIC-for-uclinux-target.patch b/package/gcc/7.3.0/0005-gcc-xtensa-don-t-force-PIC-for-uclinux-target.patch deleted file mode 100644 index 360947cbb1..0000000000 --- a/package/gcc/7.3.0/0005-gcc-xtensa-don-t-force-PIC-for-uclinux-target.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 960a2552f7b418134cdf7a31e96023a3811b98dd Mon Sep 17 00:00:00 2001 -From: Max Filippov -Date: Sun, 4 Nov 2018 23:55:59 -0800 -Subject: [PATCH] gcc: xtensa: don't force PIC for uclinux target - -xtensa-uclinux uses bFLT executable file format that cannot relocate -fields representing offsets from data to code. C++ objects built as PIC -use offsets to encode FDE structures. As a result C++ exception handling -doesn't work correctly on xtensa-uclinux. Don't use PIC by default on -xtensa-uclinux. - -gcc/ -2018-11-05 Max Filippov - - * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0. - -Signed-off-by: Max Filippov ---- -Backported from: r265823 - - gcc/config/xtensa/uclinux.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/gcc/config/xtensa/uclinux.h b/gcc/config/xtensa/uclinux.h -index ba26187c8f7a..c7743df9d97c 100644 ---- a/gcc/config/xtensa/uclinux.h -+++ b/gcc/config/xtensa/uclinux.h -@@ -59,8 +59,8 @@ along with GCC; see the file COPYING3. If not see - #undef LOCAL_LABEL_PREFIX - #define LOCAL_LABEL_PREFIX "." - --/* Always enable "-fpic" for Xtensa Linux. */ --#define XTENSA_ALWAYS_PIC 1 -+/* Don't enable "-fpic" for Xtensa uclinux. */ -+#define XTENSA_ALWAYS_PIC 0 - - #undef TARGET_LIBC_HAS_FUNCTION - #define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function --- -2.11.0 - diff --git a/package/gcc/7.3.0/0100-uclibc-conf.patch b/package/gcc/7.3.0/0100-uclibc-conf.patch deleted file mode 100644 index d354baf81f..0000000000 --- a/package/gcc/7.3.0/0100-uclibc-conf.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 326b880b20e5f8187dbda736b4c4c662cbfb00ca Mon Sep 17 00:00:00 2001 -From: Romain Naour -Date: Tue, 2 May 2017 22:36:15 +0200 -Subject: [PATCH] uclibc-conf - -[Romain: convert to git patch] -Signed-off-by: Romain Naour ---- - contrib/regression/objs-gcc.sh | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh -index 60b0497..6dc7ead 100755 ---- a/contrib/regression/objs-gcc.sh -+++ b/contrib/regression/objs-gcc.sh -@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ] - 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 --- -2.9.3 - diff --git a/package/gcc/7.3.0/0810-arm-softfloat-libgcc.patch b/package/gcc/7.3.0/0810-arm-softfloat-libgcc.patch deleted file mode 100644 index 63880dd091..0000000000 --- a/package/gcc/7.3.0/0810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 420a304ac0daa29d66da6ed5b0b49fc4c482d522 Mon Sep 17 00:00:00 2001 -From: Romain Naour -Date: Tue, 2 May 2017 22:46:18 +0200 -Subject: [PATCH] arm softfloat libgcc - -[Romain: convert to git patch] -Signed-off-by: Romain Naour ---- - gcc/config/arm/linux-elf.h | 2 +- - libgcc/config/arm/t-linux | 7 ++++++- - 2 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h -index 3d62367..dad0b97 100644 ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -58,7 +58,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" - -diff --git a/libgcc/config/arm/t-linux b/libgcc/config/arm/t-linux -index 3d520de..e7bc042 100644 ---- 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. --- -2.9.3 - diff --git a/package/gcc/7.3.0/0860-cilk-fix-build-without-wchar.patch b/package/gcc/7.3.0/0860-cilk-fix-build-without-wchar.patch deleted file mode 100644 index 61ab01c713..0000000000 --- a/package/gcc/7.3.0/0860-cilk-fix-build-without-wchar.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 714739e69ead1d9823233af40645277f6d4633ea Mon Sep 17 00:00:00 2001 -From: Peter Korsgaard -Date: Tue, 2 May 2017 23:21:46 +0200 -Subject: [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 -[Romain: convert to git patch] -Signed-off-by: Romain Naour ---- - libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/libcilkrts/include/cilk/reducer_min_max.h b/libcilkrts/include/cilk/reducer_min_max.h -index 641aa82..4f8e010 100644 ---- a/libcilkrts/include/cilk/reducer_min_max.h -+++ b/libcilkrts/include/cilk/reducer_min_max.h -@@ -3289,7 +3289,9 @@ __CILKRTS_BEGIN_EXTERN_C - 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) -@@ -3441,7 +3443,9 @@ __CILKRTS_BEGIN_EXTERN_C - 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) -@@ -3567,7 +3571,9 @@ __CILKRTS_BEGIN_EXTERN_C - 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) -@@ -3719,7 +3725,9 @@ __CILKRTS_BEGIN_EXTERN_C - 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) --- -2.9.3 - diff --git a/package/gcc/7.3.0/0892-microblaze-Revert.patch b/package/gcc/7.3.0/0892-microblaze-Revert.patch deleted file mode 100644 index 7026d0efe1..0000000000 --- a/package/gcc/7.3.0/0892-microblaze-Revert.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 707a69dfb56a2976e2b5c010f0e5cb2ac9905a07 Mon Sep 17 00:00:00 2001 -From: eager -Date: Sat, 27 May 2017 18:29:40 +0000 -Subject: [PATCH] Revert: 2016-01-21 Ajit Agarwal - - - 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 -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 - diff --git a/package/gcc/7.3.0/1000-arm-PR-target-81497-Fix-arm_acle.h-for-C.patch b/package/gcc/7.3.0/1000-arm-PR-target-81497-Fix-arm_acle.h-for-C.patch deleted file mode 100644 index 37acc8b651..0000000000 --- a/package/gcc/7.3.0/1000-arm-PR-target-81497-Fix-arm_acle.h-for-C.patch +++ /dev/null @@ -1,324 +0,0 @@ -From 1a259ac3e39bf87e6e6a5eface8b0ebc6b2a0dfe Mon Sep 17 00:00:00 2001 -From: ktkachov -Date: Tue, 5 Jun 2018 09:50:16 +0000 -Subject: [PATCH] [arm] PR target/81497: Fix arm_acle.h for C++ -MIME-Version: 1.0 -Content-Type: text/plain; charset=utf-8 -Content-Transfer-Encoding: 8bit - -When trying to compile something with arm_acle.h using G++ we get a number of nasty errors: -arm_acle.h:48:49: error: invalid conversion from ‘const void*’ to ‘const int*’ [-fpermissive] - return __builtin_arm_ldc (__coproc, __CRd, __p); - -This is because the intrinsics that are supposed to be void return the "result" of their builtin, -which is void. C lets that slide but C++ complains. - -After fixing that we run into further errors: -arm_acle.h:48:46: error: invalid conversion from 'const void*' to 'const int*' [-fpermissive] - return __builtin_arm_ldc (__coproc, __CRd, __p); - ^~~ -Because the pointer arguments in these intrinsics are void pointers but the builtin -expects int pointers. So this patch introduces new qualifiers for void pointers and their -const-qualified versions and uses that in the specification of these intrinsics. - -This gives us the opportunity of creating an arm subdirectory in g++.dg and inaugurates it -with the first arm-specific C++ tests (in that directory). - - - PR target/81497 - * config/arm/arm-builtins.c (arm_type_qualifiers): Add - qualifier_void_pointer and qualifier_const_void_pointer. - (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above. - (arm_init_builtins): Handle the above. - * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc, - __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2, - __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for - void intrinsics. - - * g++.target/arm/arm.exp: New file. - * g++.target/arm/pr81497.C: Likewise. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261191 138bc75d-0d04-0410-961f-82ee72b054a4 -Upstream-Status: Merged (gcc-8-branch) -Signed-off-by: Gaël PORTAY -[gportay: drop gcc/{,testsuite/}ChangeLog changes] ---- - gcc/config/arm/arm-builtins.c | 42 +++++++++++++--------- - gcc/config/arm/arm_acle.h | 28 +++++++-------- - gcc/testsuite/g++.target/arm/arm.exp | 50 ++++++++++++++++++++++++++ - gcc/testsuite/g++.target/arm/pr81497.C | 9 +++++ - 4 files changed, 99 insertions(+), 30 deletions(-) - create mode 100644 gcc/testsuite/g++.target/arm/arm.exp - create mode 100644 gcc/testsuite/g++.target/arm/pr81497.C - -diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c -index 7fde7a04672..183a7b907f6 100644 ---- a/gcc/config/arm/arm-builtins.c -+++ b/gcc/config/arm/arm-builtins.c -@@ -78,7 +78,11 @@ enum arm_type_qualifiers - /* Lane indices - must be within range of previous argument = a vector. */ - qualifier_lane_index = 0x200, - /* Lane indices for single lane structure loads and stores. */ -- qualifier_struct_load_store_lane_index = 0x400 -+ qualifier_struct_load_store_lane_index = 0x400, -+ /* A void pointer. */ -+ qualifier_void_pointer = 0x800, -+ /* A const void pointer. */ -+ qualifier_const_void_pointer = 0x802 - }; - - /* The qualifier_internal allows generation of a unary builtin from -@@ -202,7 +206,7 @@ arm_cdp_qualifiers[SIMD_MAX_BUILTIN_ARGS] - static enum arm_type_qualifiers - arm_ldc_qualifiers[SIMD_MAX_BUILTIN_ARGS] - = { qualifier_void, qualifier_unsigned_immediate, -- qualifier_unsigned_immediate, qualifier_const_pointer }; -+ qualifier_unsigned_immediate, qualifier_const_void_pointer }; - #define LDC_QUALIFIERS \ - (arm_ldc_qualifiers) - -@@ -210,7 +214,7 @@ arm_ldc_qualifiers[SIMD_MAX_BUILTIN_ARGS] - static enum arm_type_qualifiers - arm_stc_qualifiers[SIMD_MAX_BUILTIN_ARGS] - = { qualifier_void, qualifier_unsigned_immediate, -- qualifier_unsigned_immediate, qualifier_pointer }; -+ qualifier_unsigned_immediate, qualifier_void_pointer }; - #define STC_QUALIFIERS \ - (arm_stc_qualifiers) - -@@ -1095,19 +1099,25 @@ arm_init_builtin (unsigned int fcode, arm_builtin_datum *d, - if (qualifiers & qualifier_pointer && VECTOR_MODE_P (op_mode)) - op_mode = GET_MODE_INNER (op_mode); - -- eltype = arm_simd_builtin_type -- (op_mode, -- (qualifiers & qualifier_unsigned) != 0, -- (qualifiers & qualifier_poly) != 0); -- gcc_assert (eltype != NULL); -- -- /* Add qualifiers. */ -- if (qualifiers & qualifier_const) -- eltype = build_qualified_type (eltype, TYPE_QUAL_CONST); -- -- if (qualifiers & qualifier_pointer) -- eltype = build_pointer_type (eltype); -- -+ /* For void pointers we already have nodes constructed by the midend. */ -+ if (qualifiers & qualifier_void_pointer) -+ eltype = qualifiers & qualifier_const -+ ? const_ptr_type_node : ptr_type_node; -+ else -+ { -+ eltype -+ = arm_simd_builtin_type (op_mode, -+ (qualifiers & qualifier_unsigned) != 0, -+ (qualifiers & qualifier_poly) != 0); -+ gcc_assert (eltype != NULL); -+ -+ /* Add qualifiers. */ -+ if (qualifiers & qualifier_const) -+ eltype = build_qualified_type (eltype, TYPE_QUAL_CONST); -+ -+ if (qualifiers & qualifier_pointer) -+ eltype = build_pointer_type (eltype); -+ } - /* If we have reached arg_num == 0, we are at a non-void - return type. Otherwise, we are still processing - arguments. */ -diff --git a/gcc/config/arm/arm_acle.h b/gcc/config/arm/arm_acle.h -index 9a2f0ba30dc..c0f6ea2d156 100644 ---- a/gcc/config/arm/arm_acle.h -+++ b/gcc/config/arm/arm_acle.h -@@ -38,35 +38,35 @@ __arm_cdp (const unsigned int __coproc, const unsigned int __opc1, - const unsigned int __CRd, const unsigned int __CRn, - const unsigned int __CRm, const unsigned int __opc2) - { -- return __builtin_arm_cdp (__coproc, __opc1, __CRd, __CRn, __CRm, __opc2); -+ __builtin_arm_cdp (__coproc, __opc1, __CRd, __CRn, __CRm, __opc2); - } - - __extension__ static __inline void __attribute__ ((__always_inline__)) - __arm_ldc (const unsigned int __coproc, const unsigned int __CRd, - const void * __p) - { -- return __builtin_arm_ldc (__coproc, __CRd, __p); -+ __builtin_arm_ldc (__coproc, __CRd, __p); - } - - __extension__ static __inline void __attribute__ ((__always_inline__)) - __arm_ldcl (const unsigned int __coproc, const unsigned int __CRd, - const void * __p) - { -- return __builtin_arm_ldcl (__coproc, __CRd, __p); -+ __builtin_arm_ldcl (__coproc, __CRd, __p); - } - - __extension__ static __inline void __attribute__ ((__always_inline__)) - __arm_stc (const unsigned int __coproc, const unsigned int __CRd, - void * __p) - { -- return __builtin_arm_stc (__coproc, __CRd, __p); -+ __builtin_arm_stc (__coproc, __CRd, __p); - } - - __extension__ static __inline void __attribute__ ((__always_inline__)) - __arm_stcl (const unsigned int __coproc, const unsigned int __CRd, - void * __p) - { -- return __builtin_arm_stcl (__coproc, __CRd, __p); -+ __builtin_arm_stcl (__coproc, __CRd, __p); - } - - __extension__ static __inline void __attribute__ ((__always_inline__)) -@@ -74,7 +74,7 @@ __arm_mcr (const unsigned int __coproc, const unsigned int __opc1, - uint32_t __value, const unsigned int __CRn, const unsigned int __CRm, - const unsigned int __opc2) - { -- return __builtin_arm_mcr (__coproc, __opc1, __value, __CRn, __CRm, __opc2); -+ __builtin_arm_mcr (__coproc, __opc1, __value, __CRn, __CRm, __opc2); - } - - __extension__ static __inline uint32_t __attribute__ ((__always_inline__)) -@@ -90,35 +90,35 @@ __arm_cdp2 (const unsigned int __coproc, const unsigned int __opc1, - const unsigned int __CRd, const unsigned int __CRn, - const unsigned int __CRm, const unsigned int __opc2) - { -- return __builtin_arm_cdp2 (__coproc, __opc1, __CRd, __CRn, __CRm, __opc2); -+ __builtin_arm_cdp2 (__coproc, __opc1, __CRd, __CRn, __CRm, __opc2); - } - - __extension__ static __inline void __attribute__ ((__always_inline__)) - __arm_ldc2 (const unsigned int __coproc, const unsigned int __CRd, - const void * __p) - { -- return __builtin_arm_ldc2 (__coproc, __CRd, __p); -+ __builtin_arm_ldc2 (__coproc, __CRd, __p); - } - - __extension__ static __inline void __attribute__ ((__always_inline__)) - __arm_ldc2l (const unsigned int __coproc, const unsigned int __CRd, - const void * __p) - { -- return __builtin_arm_ldc2l (__coproc, __CRd, __p); -+ __builtin_arm_ldc2l (__coproc, __CRd, __p); - } - - __extension__ static __inline void __attribute__ ((__always_inline__)) - __arm_stc2 (const unsigned int __coproc, const unsigned int __CRd, - void * __p) - { -- return __builtin_arm_stc2 (__coproc, __CRd, __p); -+ __builtin_arm_stc2 (__coproc, __CRd, __p); - } - - __extension__ static __inline void __attribute__ ((__always_inline__)) - __arm_stc2l (const unsigned int __coproc, const unsigned int __CRd, - void * __p) - { -- return __builtin_arm_stc2l (__coproc, __CRd, __p); -+ __builtin_arm_stc2l (__coproc, __CRd, __p); - } - - __extension__ static __inline void __attribute__ ((__always_inline__)) -@@ -126,7 +126,7 @@ __arm_mcr2 (const unsigned int __coproc, const unsigned int __opc1, - uint32_t __value, const unsigned int __CRn, - const unsigned int __CRm, const unsigned int __opc2) - { -- return __builtin_arm_mcr2 (__coproc, __opc1, __value, __CRn, __CRm, __opc2); -+ __builtin_arm_mcr2 (__coproc, __opc1, __value, __CRn, __CRm, __opc2); - } - - __extension__ static __inline uint32_t __attribute__ ((__always_inline__)) -@@ -143,7 +143,7 @@ __extension__ static __inline void __attribute__ ((__always_inline__)) - __arm_mcrr (const unsigned int __coproc, const unsigned int __opc1, - uint64_t __value, const unsigned int __CRm) - { -- return __builtin_arm_mcrr (__coproc, __opc1, __value, __CRm); -+ __builtin_arm_mcrr (__coproc, __opc1, __value, __CRm); - } - - __extension__ static __inline uint64_t __attribute__ ((__always_inline__)) -@@ -159,7 +159,7 @@ __extension__ static __inline void __attribute__ ((__always_inline__)) - __arm_mcrr2 (const unsigned int __coproc, const unsigned int __opc1, - uint64_t __value, const unsigned int __CRm) - { -- return __builtin_arm_mcrr2 (__coproc, __opc1, __value, __CRm); -+ __builtin_arm_mcrr2 (__coproc, __opc1, __value, __CRm); - } - - __extension__ static __inline uint64_t __attribute__ ((__always_inline__)) -diff --git a/gcc/testsuite/g++.target/arm/arm.exp b/gcc/testsuite/g++.target/arm/arm.exp -new file mode 100644 -index 00000000000..1a169d2f220 ---- /dev/null -+++ b/gcc/testsuite/g++.target/arm/arm.exp -@@ -0,0 +1,50 @@ -+# Specific regression driver for arm. -+# Copyright (C) 2009-2018 Free Software Foundation, Inc. -+# -+# This file is part of GCC. -+# -+# GCC is free software; you can redistribute it and/or modify it -+# under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 3, or (at your option) -+# any later version. -+# -+# GCC is distributed in the hope that it will be useful, but -+# WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+# General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with GCC; see the file COPYING3. If not see -+# . */ -+ -+# GCC testsuite that uses the `dg.exp' driver. -+ -+# Exit immediately if this isn't an arm target. -+if {![istarget arm*-*-*] } then { -+ return -+} -+ -+# Load support procs. -+load_lib g++-dg.exp -+ -+global DEFAULT_CXXFLAGS -+if ![info exists DEFAULT_CXXFLAGS] then { -+ set DEFAULT_CXXFLAGS " -pedantic-errors" -+} -+ -+ -+global dg_runtest_extra_prunes -+set dg_runtest_extra_prunes "" -+lappend dg_runtest_extra_prunes "warning: switch -m(cpu|arch)=.* conflicts with -m(cpu|arch)=.* switch" -+ -+# Initialize `dg'. -+dg-init -+ -+# Main loop. -+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] \ -+ "" $DEFAULT_CXXFLAGS -+ -+# All done. -+set dg_runtest_extra_prunes "" -+dg-finish -+ -diff --git a/gcc/testsuite/g++.target/arm/pr81497.C b/gcc/testsuite/g++.target/arm/pr81497.C -new file mode 100644 -index 00000000000..0519a3a3045 ---- /dev/null -+++ b/gcc/testsuite/g++.target/arm/pr81497.C -@@ -0,0 +1,9 @@ -+/* { dg-do compile } */ -+/* { dg-require-effective-target arm_thumb2_ok } */ -+ -+#include -+ -+int main () -+{ -+ return 0; -+} --- -2.17.1 - diff --git a/package/gcc/7.3.0/1001-gcc-define-_REENTRANT-for-RISC-V-when-pthread-is-pas.patch b/package/gcc/7.3.0/1001-gcc-define-_REENTRANT-for-RISC-V-when-pthread-is-pas.patch deleted file mode 100644 index 1d4f8c015f..0000000000 --- a/package/gcc/7.3.0/1001-gcc-define-_REENTRANT-for-RISC-V-when-pthread-is-pas.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 6ea832d09415cd82b744d0cf168cdd728c43df47 Mon Sep 17 00:00:00 2001 -From: Mark Corbin -Date: Thu, 22 Nov 2018 12:19:11 +0000 -Subject: [PATCH] gcc: define _REENTRANT for RISC-V when -pthread is passed - -The detection of pthread support fails on RISC-V unless _REENTRANT -is defined. Added the CPP_SPEC definition from gcc 8.1.0 to correct -this. - -Signed-off-by: Mark Corbin ---- - gcc/config/riscv/linux.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h -index 4b2f7b6e1fd..b00d23ddfa0 100644 ---- a/gcc/config/riscv/linux.h -+++ b/gcc/config/riscv/linux.h -@@ -47,6 +47,8 @@ along with GCC; see the file COPYING3. If not see - - #define ICACHE_FLUSH_FUNC "__riscv_flush_icache" - -+#define CPP_SPEC "%{pthread:-D_REENTRANT}" -+ - #define LINK_SPEC "\ - -melf" XLEN_SPEC "lriscv \ - %{shared} \ --- -2.19.1 - diff --git a/package/gcc/7.4.0/0001-m68k-coldfire-pr68467.patch b/package/gcc/7.4.0/0001-m68k-coldfire-pr68467.patch new file mode 100644 index 0000000000..0069b57134 --- /dev/null +++ b/package/gcc/7.4.0/0001-m68k-coldfire-pr68467.patch @@ -0,0 +1,48 @@ +Backport from upstream, see +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68467 + +Signed-off-by: Waldemar Brodkorb +Signed-off-by: Romain Naour +diff -Nur gcc-7.2.0.orig/gcc/config/m68k/m68k.c gcc-7.2.0/gcc/config/m68k/m68k.c +--- gcc-7.2.0.orig/gcc/config/m68k/m68k.c 2017-04-03 22:30:56.274463000 +0000 ++++ gcc-7.2.0/gcc/config/m68k/m68k.c 2018-01-27 02:16:53.779367849 +0000 +@@ -182,6 +182,8 @@ + const_tree, bool); + static bool m68k_cannot_force_const_mem (machine_mode mode, rtx x); + static bool m68k_output_addr_const_extra (FILE *, rtx); ++static machine_mode m68k_promote_function_mode (const_tree, machine_mode, ++ int *, const_tree, int); + static void m68k_init_sync_libfuncs (void) ATTRIBUTE_UNUSED; + static enum flt_eval_method + m68k_excess_precision (enum excess_precision_type); +@@ -332,6 +334,9 @@ + #undef TARGET_ATOMIC_TEST_AND_SET_TRUEVAL + #define TARGET_ATOMIC_TEST_AND_SET_TRUEVAL 128 + ++#undef TARGET_PROMOTE_FUNCTION_MODE ++#define TARGET_PROMOTE_FUNCTION_MODE m68k_promote_function_mode ++ + static const struct attribute_spec m68k_attribute_table[] = + { + /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler, +@@ -6571,4 +6576,20 @@ + return FLT_EVAL_METHOD_UNPREDICTABLE; + } + ++/* Implement TARGET_PROMOTE_FUNCTION_MODE. */ ++ ++static machine_mode ++m68k_promote_function_mode (const_tree type, machine_mode mode, ++ int *punsignedp ATTRIBUTE_UNUSED, ++ const_tree fntype ATTRIBUTE_UNUSED, ++ int for_return) ++{ ++ /* Promote libcall arguments narrower than int to match the normal C ++ ABI (for which promotions are handled via ++ TARGET_PROMOTE_PROTOTYPES). */ ++ if (type == NULL_TREE && !for_return && (mode == QImode || mode == HImode)) ++ return SImode; ++ return mode; ++} ++ + #include "gt-m68k.h" diff --git a/package/gcc/7.4.0/0100-uclibc-conf.patch b/package/gcc/7.4.0/0100-uclibc-conf.patch new file mode 100644 index 0000000000..d354baf81f --- /dev/null +++ b/package/gcc/7.4.0/0100-uclibc-conf.patch @@ -0,0 +1,29 @@ +From 326b880b20e5f8187dbda736b4c4c662cbfb00ca Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Tue, 2 May 2017 22:36:15 +0200 +Subject: [PATCH] uclibc-conf + +[Romain: convert to git patch] +Signed-off-by: Romain Naour +--- + contrib/regression/objs-gcc.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh +index 60b0497..6dc7ead 100755 +--- a/contrib/regression/objs-gcc.sh ++++ b/contrib/regression/objs-gcc.sh +@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ] + 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 +-- +2.9.3 + diff --git a/package/gcc/7.4.0/0810-arm-softfloat-libgcc.patch b/package/gcc/7.4.0/0810-arm-softfloat-libgcc.patch new file mode 100644 index 0000000000..63880dd091 --- /dev/null +++ b/package/gcc/7.4.0/0810-arm-softfloat-libgcc.patch @@ -0,0 +1,45 @@ +From 420a304ac0daa29d66da6ed5b0b49fc4c482d522 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Tue, 2 May 2017 22:46:18 +0200 +Subject: [PATCH] arm softfloat libgcc + +[Romain: convert to git patch] +Signed-off-by: Romain Naour +--- + gcc/config/arm/linux-elf.h | 2 +- + libgcc/config/arm/t-linux | 7 ++++++- + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h +index 3d62367..dad0b97 100644 +--- a/gcc/config/arm/linux-elf.h ++++ b/gcc/config/arm/linux-elf.h +@@ -58,7 +58,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" + +diff --git a/libgcc/config/arm/t-linux b/libgcc/config/arm/t-linux +index 3d520de..e7bc042 100644 +--- 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. +-- +2.9.3 + diff --git a/package/gcc/7.4.0/0860-cilk-fix-build-without-wchar.patch b/package/gcc/7.4.0/0860-cilk-fix-build-without-wchar.patch new file mode 100644 index 0000000000..61ab01c713 --- /dev/null +++ b/package/gcc/7.4.0/0860-cilk-fix-build-without-wchar.patch @@ -0,0 +1,64 @@ +From 714739e69ead1d9823233af40645277f6d4633ea Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Tue, 2 May 2017 23:21:46 +0200 +Subject: [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 +[Romain: convert to git patch] +Signed-off-by: Romain Naour +--- + libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/libcilkrts/include/cilk/reducer_min_max.h b/libcilkrts/include/cilk/reducer_min_max.h +index 641aa82..4f8e010 100644 +--- a/libcilkrts/include/cilk/reducer_min_max.h ++++ b/libcilkrts/include/cilk/reducer_min_max.h +@@ -3289,7 +3289,9 @@ __CILKRTS_BEGIN_EXTERN_C + 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) +@@ -3441,7 +3443,9 @@ __CILKRTS_BEGIN_EXTERN_C + 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) +@@ -3567,7 +3571,9 @@ __CILKRTS_BEGIN_EXTERN_C + 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) +@@ -3719,7 +3725,9 @@ __CILKRTS_BEGIN_EXTERN_C + 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) +-- +2.9.3 + diff --git a/package/gcc/7.4.0/0892-microblaze-Revert.patch b/package/gcc/7.4.0/0892-microblaze-Revert.patch new file mode 100644 index 0000000000..f7ea1e8382 --- /dev/null +++ b/package/gcc/7.4.0/0892-microblaze-Revert.patch @@ -0,0 +1,41 @@ +From 707a69dfb56a2976e2b5c010f0e5cb2ac9905a07 Mon Sep 17 00:00:00 2001 +From: eager +Date: Sat, 27 May 2017 18:29:40 +0000 +Subject: [PATCH] Revert: 2016-01-21 Ajit Agarwal + + + 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 +Signed-off-by: Romain Naour +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 + diff --git a/package/gcc/7.4.0/1000-arm-PR-target-81497-Fix-arm_acle.h-for-C.patch b/package/gcc/7.4.0/1000-arm-PR-target-81497-Fix-arm_acle.h-for-C.patch new file mode 100644 index 0000000000..fb8509fae7 --- /dev/null +++ b/package/gcc/7.4.0/1000-arm-PR-target-81497-Fix-arm_acle.h-for-C.patch @@ -0,0 +1,324 @@ +From 1a259ac3e39bf87e6e6a5eface8b0ebc6b2a0dfe Mon Sep 17 00:00:00 2001 +From: ktkachov +Date: Tue, 5 Jun 2018 09:50:16 +0000 +Subject: [PATCH] [arm] PR target/81497: Fix arm_acle.h for C++ +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit + +When trying to compile something with arm_acle.h using G++ we get a number of nasty errors: +arm_acle.h:48:49: error: invalid conversion from ‘const void*’ to ‘const int*’ [-fpermissive] + return __builtin_arm_ldc (__coproc, __CRd, __p); + +This is because the intrinsics that are supposed to be void return the "result" of their builtin, +which is void. C lets that slide but C++ complains. + +After fixing that we run into further errors: +arm_acle.h:48:46: error: invalid conversion from 'const void*' to 'const int*' [-fpermissive] + return __builtin_arm_ldc (__coproc, __CRd, __p); + ^~~ +Because the pointer arguments in these intrinsics are void pointers but the builtin +expects int pointers. So this patch introduces new qualifiers for void pointers and their +const-qualified versions and uses that in the specification of these intrinsics. + +This gives us the opportunity of creating an arm subdirectory in g++.dg and inaugurates it +with the first arm-specific C++ tests (in that directory). + + + PR target/81497 + * config/arm/arm-builtins.c (arm_type_qualifiers): Add + qualifier_void_pointer and qualifier_const_void_pointer. + (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above. + (arm_init_builtins): Handle the above. + * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc, + __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2, + __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for + void intrinsics. + + * g++.target/arm/arm.exp: New file. + * g++.target/arm/pr81497.C: Likewise. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261191 138bc75d-0d04-0410-961f-82ee72b054a4 +Upstream-Status: Merged (gcc-8-branch) +Signed-off-by: Gaël PORTAY +[gportay: drop gcc/{,testsuite/}ChangeLog changes] +Signed-off-by: Romain Naour +--- + gcc/config/arm/arm-builtins.c | 42 +++++++++++++--------- + gcc/config/arm/arm_acle.h | 28 +++++++-------- + gcc/testsuite/g++.target/arm/arm.exp | 50 ++++++++++++++++++++++++++ + gcc/testsuite/g++.target/arm/pr81497.C | 9 +++++ + 4 files changed, 99 insertions(+), 30 deletions(-) + create mode 100644 gcc/testsuite/g++.target/arm/arm.exp + create mode 100644 gcc/testsuite/g++.target/arm/pr81497.C + +diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c +index 7fde7a04672..183a7b907f6 100644 +--- a/gcc/config/arm/arm-builtins.c ++++ b/gcc/config/arm/arm-builtins.c +@@ -75,7 +75,11 @@ enum arm_type_qualifiers + /* Lane indices - must be within range of previous argument = a vector. */ + qualifier_lane_index = 0x200, + /* Lane indices for single lane structure loads and stores. */ +- qualifier_struct_load_store_lane_index = 0x400 ++ qualifier_struct_load_store_lane_index = 0x400, ++ /* A void pointer. */ ++ qualifier_void_pointer = 0x800, ++ /* A const void pointer. */ ++ qualifier_const_void_pointer = 0x802 + }; + + /* The qualifier_internal allows generation of a unary builtin from +@@ -185,7 +189,7 @@ arm_cdp_qualifiers[SIMD_MAX_BUILTIN_ARGS] + static enum arm_type_qualifiers + arm_ldc_qualifiers[SIMD_MAX_BUILTIN_ARGS] + = { qualifier_void, qualifier_unsigned_immediate, +- qualifier_unsigned_immediate, qualifier_const_pointer }; ++ qualifier_unsigned_immediate, qualifier_const_void_pointer }; + #define LDC_QUALIFIERS \ + (arm_ldc_qualifiers) + +@@ -193,7 +197,7 @@ arm_ldc_qualifiers[SIMD_MAX_BUILTIN_ARGS] + static enum arm_type_qualifiers + arm_stc_qualifiers[SIMD_MAX_BUILTIN_ARGS] + = { qualifier_void, qualifier_unsigned_immediate, +- qualifier_unsigned_immediate, qualifier_pointer }; ++ qualifier_unsigned_immediate, qualifier_void_pointer }; + #define STC_QUALIFIERS \ + (arm_stc_qualifiers) + +@@ -1079,19 +1083,25 @@ arm_init_builtin (unsigned int fcode, arm_builtin_datum *d, + if (qualifiers & qualifier_pointer && VECTOR_MODE_P (op_mode)) + op_mode = GET_MODE_INNER (op_mode); + +- eltype = arm_simd_builtin_type +- (op_mode, +- (qualifiers & qualifier_unsigned) != 0, +- (qualifiers & qualifier_poly) != 0); +- gcc_assert (eltype != NULL); +- +- /* Add qualifiers. */ +- if (qualifiers & qualifier_const) +- eltype = build_qualified_type (eltype, TYPE_QUAL_CONST); +- +- if (qualifiers & qualifier_pointer) +- eltype = build_pointer_type (eltype); +- ++ /* For void pointers we already have nodes constructed by the midend. */ ++ if (qualifiers & qualifier_void_pointer) ++ eltype = qualifiers & qualifier_const ++ ? const_ptr_type_node : ptr_type_node; ++ else ++ { ++ eltype ++ = arm_simd_builtin_type (op_mode, ++ (qualifiers & qualifier_unsigned) != 0, ++ (qualifiers & qualifier_poly) != 0); ++ gcc_assert (eltype != NULL); ++ ++ /* Add qualifiers. */ ++ if (qualifiers & qualifier_const) ++ eltype = build_qualified_type (eltype, TYPE_QUAL_CONST); ++ ++ if (qualifiers & qualifier_pointer) ++ eltype = build_pointer_type (eltype); ++ } + /* If we have reached arg_num == 0, we are at a non-void + return type. Otherwise, we are still processing + arguments. */ +diff --git a/gcc/config/arm/arm_acle.h b/gcc/config/arm/arm_acle.h +index 9a2f0ba30dc..c0f6ea2d156 100644 +--- a/gcc/config/arm/arm_acle.h ++++ b/gcc/config/arm/arm_acle.h +@@ -38,35 +38,35 @@ __arm_cdp (const unsigned int __coproc, const unsigned int __opc1, + const unsigned int __CRd, const unsigned int __CRn, + const unsigned int __CRm, const unsigned int __opc2) + { +- return __builtin_arm_cdp (__coproc, __opc1, __CRd, __CRn, __CRm, __opc2); ++ __builtin_arm_cdp (__coproc, __opc1, __CRd, __CRn, __CRm, __opc2); + } + + __extension__ static __inline void __attribute__ ((__always_inline__)) + __arm_ldc (const unsigned int __coproc, const unsigned int __CRd, + const void * __p) + { +- return __builtin_arm_ldc (__coproc, __CRd, __p); ++ __builtin_arm_ldc (__coproc, __CRd, __p); + } + + __extension__ static __inline void __attribute__ ((__always_inline__)) + __arm_ldcl (const unsigned int __coproc, const unsigned int __CRd, + const void * __p) + { +- return __builtin_arm_ldcl (__coproc, __CRd, __p); ++ __builtin_arm_ldcl (__coproc, __CRd, __p); + } + + __extension__ static __inline void __attribute__ ((__always_inline__)) + __arm_stc (const unsigned int __coproc, const unsigned int __CRd, + void * __p) + { +- return __builtin_arm_stc (__coproc, __CRd, __p); ++ __builtin_arm_stc (__coproc, __CRd, __p); + } + + __extension__ static __inline void __attribute__ ((__always_inline__)) + __arm_stcl (const unsigned int __coproc, const unsigned int __CRd, + void * __p) + { +- return __builtin_arm_stcl (__coproc, __CRd, __p); ++ __builtin_arm_stcl (__coproc, __CRd, __p); + } + + __extension__ static __inline void __attribute__ ((__always_inline__)) +@@ -74,7 +74,7 @@ __arm_mcr (const unsigned int __coproc, const unsigned int __opc1, + uint32_t __value, const unsigned int __CRn, const unsigned int __CRm, + const unsigned int __opc2) + { +- return __builtin_arm_mcr (__coproc, __opc1, __value, __CRn, __CRm, __opc2); ++ __builtin_arm_mcr (__coproc, __opc1, __value, __CRn, __CRm, __opc2); + } + + __extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +@@ -90,35 +90,35 @@ __arm_cdp2 (const unsigned int __coproc, const unsigned int __opc1, + const unsigned int __CRd, const unsigned int __CRn, + const unsigned int __CRm, const unsigned int __opc2) + { +- return __builtin_arm_cdp2 (__coproc, __opc1, __CRd, __CRn, __CRm, __opc2); ++ __builtin_arm_cdp2 (__coproc, __opc1, __CRd, __CRn, __CRm, __opc2); + } + + __extension__ static __inline void __attribute__ ((__always_inline__)) + __arm_ldc2 (const unsigned int __coproc, const unsigned int __CRd, + const void * __p) + { +- return __builtin_arm_ldc2 (__coproc, __CRd, __p); ++ __builtin_arm_ldc2 (__coproc, __CRd, __p); + } + + __extension__ static __inline void __attribute__ ((__always_inline__)) + __arm_ldc2l (const unsigned int __coproc, const unsigned int __CRd, + const void * __p) + { +- return __builtin_arm_ldc2l (__coproc, __CRd, __p); ++ __builtin_arm_ldc2l (__coproc, __CRd, __p); + } + + __extension__ static __inline void __attribute__ ((__always_inline__)) + __arm_stc2 (const unsigned int __coproc, const unsigned int __CRd, + void * __p) + { +- return __builtin_arm_stc2 (__coproc, __CRd, __p); ++ __builtin_arm_stc2 (__coproc, __CRd, __p); + } + + __extension__ static __inline void __attribute__ ((__always_inline__)) + __arm_stc2l (const unsigned int __coproc, const unsigned int __CRd, + void * __p) + { +- return __builtin_arm_stc2l (__coproc, __CRd, __p); ++ __builtin_arm_stc2l (__coproc, __CRd, __p); + } + + __extension__ static __inline void __attribute__ ((__always_inline__)) +@@ -126,7 +126,7 @@ __arm_mcr2 (const unsigned int __coproc, const unsigned int __opc1, + uint32_t __value, const unsigned int __CRn, + const unsigned int __CRm, const unsigned int __opc2) + { +- return __builtin_arm_mcr2 (__coproc, __opc1, __value, __CRn, __CRm, __opc2); ++ __builtin_arm_mcr2 (__coproc, __opc1, __value, __CRn, __CRm, __opc2); + } + + __extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +@@ -143,7 +143,7 @@ __extension__ static __inline void __attribute__ ((__always_inline__)) + __arm_mcrr (const unsigned int __coproc, const unsigned int __opc1, + uint64_t __value, const unsigned int __CRm) + { +- return __builtin_arm_mcrr (__coproc, __opc1, __value, __CRm); ++ __builtin_arm_mcrr (__coproc, __opc1, __value, __CRm); + } + + __extension__ static __inline uint64_t __attribute__ ((__always_inline__)) +@@ -159,7 +159,7 @@ __extension__ static __inline void __attribute__ ((__always_inline__)) + __arm_mcrr2 (const unsigned int __coproc, const unsigned int __opc1, + uint64_t __value, const unsigned int __CRm) + { +- return __builtin_arm_mcrr2 (__coproc, __opc1, __value, __CRm); ++ __builtin_arm_mcrr2 (__coproc, __opc1, __value, __CRm); + } + + __extension__ static __inline uint64_t __attribute__ ((__always_inline__)) +diff --git a/gcc/testsuite/g++.target/arm/arm.exp b/gcc/testsuite/g++.target/arm/arm.exp +new file mode 100644 +index 00000000000..1a169d2f220 +--- /dev/null ++++ b/gcc/testsuite/g++.target/arm/arm.exp +@@ -0,0 +1,50 @@ ++# Specific regression driver for arm. ++# Copyright (C) 2009-2018 Free Software Foundation, Inc. ++# ++# This file is part of GCC. ++# ++# GCC is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++# ++# GCC is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with GCC; see the file COPYING3. If not see ++# . */ ++ ++# GCC testsuite that uses the `dg.exp' driver. ++ ++# Exit immediately if this isn't an arm target. ++if {![istarget arm*-*-*] } then { ++ return ++} ++ ++# Load support procs. ++load_lib g++-dg.exp ++ ++global DEFAULT_CXXFLAGS ++if ![info exists DEFAULT_CXXFLAGS] then { ++ set DEFAULT_CXXFLAGS " -pedantic-errors" ++} ++ ++ ++global dg_runtest_extra_prunes ++set dg_runtest_extra_prunes "" ++lappend dg_runtest_extra_prunes "warning: switch -m(cpu|arch)=.* conflicts with -m(cpu|arch)=.* switch" ++ ++# Initialize `dg'. ++dg-init ++ ++# Main loop. ++dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] \ ++ "" $DEFAULT_CXXFLAGS ++ ++# All done. ++set dg_runtest_extra_prunes "" ++dg-finish ++ +diff --git a/gcc/testsuite/g++.target/arm/pr81497.C b/gcc/testsuite/g++.target/arm/pr81497.C +new file mode 100644 +index 00000000000..0519a3a3045 +--- /dev/null ++++ b/gcc/testsuite/g++.target/arm/pr81497.C +@@ -0,0 +1,9 @@ ++/* { dg-do compile } */ ++/* { dg-require-effective-target arm_thumb2_ok } */ ++ ++#include ++ ++int main () ++{ ++ return 0; ++} +-- +2.17.1 + diff --git a/package/gcc/7.4.0/1001-gcc-define-_REENTRANT-for-RISC-V-when-pthread-is-pas.patch b/package/gcc/7.4.0/1001-gcc-define-_REENTRANT-for-RISC-V-when-pthread-is-pas.patch new file mode 100644 index 0000000000..accaf0214d --- /dev/null +++ b/package/gcc/7.4.0/1001-gcc-define-_REENTRANT-for-RISC-V-when-pthread-is-pas.patch @@ -0,0 +1,31 @@ +From 6ea832d09415cd82b744d0cf168cdd728c43df47 Mon Sep 17 00:00:00 2001 +From: Mark Corbin +Date: Thu, 22 Nov 2018 12:19:11 +0000 +Subject: [PATCH] gcc: define _REENTRANT for RISC-V when -pthread is passed + +The detection of pthread support fails on RISC-V unless _REENTRANT +is defined. Added the CPP_SPEC definition from gcc 8.1.0 to correct +this. + +Signed-off-by: Mark Corbin +Signed-off-by: Romain Naour +--- + gcc/config/riscv/linux.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h +index 4b2f7b6e1fd..b00d23ddfa0 100644 +--- a/gcc/config/riscv/linux.h ++++ b/gcc/config/riscv/linux.h +@@ -47,6 +47,8 @@ along with GCC; see the file COPYING3. If not see + + #define ICACHE_FLUSH_FUNC "__riscv_flush_icache" + ++#define CPP_SPEC "%{pthread:-D_REENTRANT}" ++ + #define LINK_SPEC "\ + -melf" XLEN_SPEC "lriscv \ + %{shared} \ +-- +2.19.1 + diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host index 55a9c8b69f..c2925cc6dc 100644 --- a/package/gcc/Config.in.host +++ b/package/gcc/Config.in.host @@ -83,7 +83,7 @@ config BR2_GCC_VERSION default "4.9.4" if BR2_GCC_VERSION_4_9_X default "5.5.0" if BR2_GCC_VERSION_5_X default "6.4.0" if BR2_GCC_VERSION_6_X - default "7.3.0" if BR2_GCC_VERSION_7_X + default "7.4.0" if BR2_GCC_VERSION_7_X default "8.2.0" if BR2_GCC_VERSION_8_X default "arc-2018.09-release" if BR2_GCC_VERSION_ARC default "or1k-musl-5.4.0-20170218" if BR2_GCC_VERSION_OR1K diff --git a/package/gcc/gcc.hash b/package/gcc/gcc.hash index 9f671b657a..9ae7e58f6b 100644 --- a/package/gcc/gcc.hash +++ b/package/gcc/gcc.hash @@ -4,8 +4,8 @@ sha512 93abb78e16277454f41a8e9810f41f66c0fdffdc539a762ff6b67d3037f78db971378683 sha512 670ff52c2ae12c7852c12987e91798c5aa8bd6daf21f0d6e0cd57a4aa59cc4f06a837fe76426eaa1424cfddca937bed377680700eadc04d76b9180d462364fa1 gcc-5.5.0.tar.xz # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-6.4.0/sha512.sum sha512 02c60e54527c7adf584798d5251f8a0b80c93d5deafce82501b2c28e6692e0bd783927bbfc4bc527a863c0cccc025150a34740a9e29badb02d4b48e56a8aba90 gcc-6.4.0.tar.xz -# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-7.3.0/sha512.sum -sha512 ad41a7e4584e40e92cdf860bc0288500fbaf5dfb7e8c3fcabe9eba809c87bcfa85b46c19c19921b0cdf6d05483faede8287bb9ea120c0d1559449a70e602c8d4 gcc-7.3.0.tar.xz +# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-7.4.0/sha512.sum +sha512 8864d8e4b97c2e1a4f17422f6e68120172ebefeab97b1757734f7185ca68a6b9a89011c6833c03fa454c17b0ac35b15e1d284881e6971035948ac6100f3aa45e gcc-7.4.0.tar.xz # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-8.2.0/sha512.sum sha512 64898a165f67e136d802a92e7633bf1b06c85266027e52127ea025bf5fc2291b5e858288aac0bdba246e6cdf7c6ec88bc8e0e7f3f6f1985f4297710cafde56ed gcc-8.2.0.tar.xz