Skip to contentSkip to conversation

gcc: Add GCC 5.2.x option

PATCH New Cyril Bur 2 participants 3 messages Feb 26, 2016 – Feb 28, 2016

lore
Share & tools
lore

Cyril Bur

author
#0 lore raw

PATCH 1/1 gcc: Add GCC 5.2.x option

GCC 5.3.x introduces a regression with PowerPC Altivec/VSX code generation.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69969

---
I'm not sure if this patch is worth the trouble. By the looks of it the GCC guys are aiming to have a fix in 5.4 and it is unlikely most users are doing things that would result in them hitting the bug.

 package/gcc/5.2.0/100-uclibc-conf.patch            |  15 ++
 ...gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch |  29 +++
 package/gcc/5.2.0/301-missing-execinfo_h.patch     |  13 +
 package/gcc/5.2.0/810-arm-softfloat-libgcc.patch   |  30 +++
 package/gcc/5.2.0/830-arm_unbreak_armv4t.patch     |  15 ++
 .../840-microblaze-enable-dwarf-eh-support.patch   | 166 ++++++++++++
 package/gcc/5.2.0/850-libstdcxx-uclibc-c99.patch   | 273 +++++++++++++++++++
 package/gcc/5.2.0/860-cilk-wchar.patch             |  56 ++++
 .../870-xtensa-add-mauto-litpools-option.patch     | 290 +++++++++++++++++++++
 .../871-xtensa-reimplement-register-spilling.patch |  76 ++++++
 ...unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch |  31 +++
 .../gcc/5.2.0/873-xtensa-fix-_Unwind_GetCFA.patch  |  40 +++
 .../5.2.0/900-libitm-fixes-for-musl-support.patch  |  65 +++++
 .../901-fixincludes-update-for-musl-support.patch  |  32 +++
 package/gcc/5.2.0/902-unwind-fix-for-musl.patch    |  36 +++
 ...dc++-libgfortran-gthr-workaround-for-musl.patch |  80 ++++++
 package/gcc/5.2.0/904-musl-libc-config.patch       | 285 ++++++++++++++++++++
 .../gcc/5.2.0/905-add-musl-support-to-gcc.patch    | 130 +++++++++
 package/gcc/5.2.0/906-mips-musl-support.patch      |  37 +++
 package/gcc/5.2.0/907-x86-musl-support.patch       |  45 ++++
 package/gcc/5.2.0/908-arm-musl-support.patch       |  45 ++++
 package/gcc/5.2.0/909-aarch64-musl-support.patch   |  33 +++
 package/gcc/Config.in.host                         |   9 +
 package/gcc/gcc.hash                               |   2 +
 24 files changed, 1833 insertions(+)
 create mode 100644 package/gcc/5.2.0/100-uclibc-conf.patch
 create mode 100644 package/gcc/5.2.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
 create mode 100644 package/gcc/5.2.0/301-missing-execinfo_h.patch
 create mode 100644 package/gcc/5.2.0/810-arm-softfloat-libgcc.patch
 create mode 100644 package/gcc/5.2.0/830-arm_unbreak_armv4t.patch
 create mode 100644 package/gcc/5.2.0/840-microblaze-enable-dwarf-eh-support.patch
 create mode 100644 package/gcc/5.2.0/850-libstdcxx-uclibc-c99.patch
 create mode 100644 package/gcc/5.2.0/860-cilk-wchar.patch
 create mode 100644 package/gcc/5.2.0/870-xtensa-add-mauto-litpools-option.patch
 create mode 100644 package/gcc/5.2.0/871-xtensa-reimplement-register-spilling.patch
 create mode 100644 package/gcc/5.2.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
 create mode 100644 package/gcc/5.2.0/873-xtensa-fix-_Unwind_GetCFA.patch
 create mode 100644 package/gcc/5.2.0/900-libitm-fixes-for-musl-support.patch
 create mode 100644 package/gcc/5.2.0/901-fixincludes-update-for-musl-support.patch
 create mode 100644 package/gcc/5.2.0/902-unwind-fix-for-musl.patch
 create mode 100644 package/gcc/5.2.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch
 create mode 100644 package/gcc/5.2.0/904-musl-libc-config.patch
 create mode 100644 package/gcc/5.2.0/905-add-musl-support-to-gcc.patch
 create mode 100644 package/gcc/5.2.0/906-mips-musl-support.patch
 create mode 100644 package/gcc/5.2.0/907-x86-musl-support.patch
 create mode 100644 package/gcc/5.2.0/908-arm-musl-support.patch
 create mode 100644 package/gcc/5.2.0/909-aarch64-musl-support.patch
package/gcc/5.2.0/100-uclibc-conf.patch new file +15 -0
new file mode 100644
index 0000000..73d1f0d
@@ -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
package/gcc/5.2.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch new file +29 -0
new file mode 100644
index 0000000..c11ad35
@@ -0,0 +1,29 @@
+From 9bf6066d588632dab9f78932df15b5b4140f31f3 Mon Sep 17 00:00:00 2001
+From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>
+Date: Fri, 6 Nov 2015 14:27:23 +0100
+Subject: [PATCH] gcc/config.gcc: fix typo for powerpc e6500 cpu_is_64bit
+
+Otherwise it is not recognized as a 64-bit powerpc and gcc will not generate
+64-bit binaries by default.
+
+Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
+---
+ gcc/config.gcc | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 4a7cbd2..9cc765e 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -439,7 +439,7 @@ powerpc*-*-*)
+ 	cpu_type=rs6000
+ 	extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h htmintrin.h htmxlintrin.h"
+ 	case x$with_cpu in
+-	    xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345678]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|Xe6500)
++	    xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345678]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500)
+ 		cpu_is_64bit=yes
+ 		;;
+ 	esac
+-- 
+2.6.2
+
package/gcc/5.2.0/301-missing-execinfo_h.patch new file +13 -0
new file mode 100644
index 0000000..2d0e7ba
@@ -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
package/gcc/5.2.0/810-arm-softfloat-libgcc.patch new file +30 -0
new file mode 100644
index 0000000..5efa7fd
@@ -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.
package/gcc/5.2.0/830-arm_unbreak_armv4t.patch new file +15 -0
new file mode 100644
index 0000000..b730059
@@ -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.  */
package/gcc/5.2.0/840-microblaze-enable-dwarf-eh-support.patch new file +166 -0

166 lines not on this page · raw message

package/gcc/5.2.0/850-libstdcxx-uclibc-c99.patch new file +273 -0

273 lines not on this page · raw message

package/gcc/5.2.0/860-cilk-wchar.patch new file +56 -0

56 lines not on this page · raw message

package/gcc/5.2.0/870-xtensa-add-mauto-litpools-option.patch new file +290 -0

290 lines not on this page · raw message

package/gcc/5.2.0/871-xtensa-reimplement-register-spilling.patch new file +76 -0

76 lines not on this page · raw message

package/gcc/5.2.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch new file +31 -0
new file mode 100644
index 0000000..9707f68
@@ -0,0 +1,31 @@
+From 7d7a85f75ba218df4a4226e95865fc8fa561cb86 Mon Sep 17 00:00:00 2001
+From: Max Filippov <[email protected]>
+Date: Fri, 14 Aug 2015 02:45:02 +0300
+Subject: [PATCH 2/3] xtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fde
+
+This allows having exception cleanup code in binaries that don't
+register their unwind tables.
+
+2015-08-18  Max Filippov  <[email protected]>
+libgcc/
+	* config/xtensa/t-windowed (LIB2ADDEH): Replace unwind-dw2-fde
+	with unwind-dw2-fde-dip.
+
+Signed-off-by: Max Filippov <[email protected]>
+---
+Backported from: r226963
+
+ libgcc/config/xtensa/t-windowed | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libgcc/config/xtensa/t-windowed b/libgcc/config/xtensa/t-windowed
+index 7d9e9db..a99156c 100644
+--- a/libgcc/config/xtensa/t-windowed
++++ b/libgcc/config/xtensa/t-windowed
+@@ -1,2 +1,2 @@
+ LIB2ADDEH = $(srcdir)/config/xtensa/unwind-dw2-xtensa.c \
+-   $(srcdir)/unwind-dw2-fde.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
++   $(srcdir)/unwind-dw2-fde-dip.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
+-- 
+1.8.1.4
+
package/gcc/5.2.0/873-xtensa-fix-_Unwind_GetCFA.patch new file +40 -0
new file mode 100644
index 0000000..2d8eb7c
@@ -0,0 +1,40 @@
+From b33905dc310f475ddbde4c9fb7230724b2068a2b Mon Sep 17 00:00:00 2001
+From: Max Filippov <[email protected]>
+Date: Sat, 15 Aug 2015 05:12:11 +0300
+Subject: [PATCH 3/3] xtensa: fix _Unwind_GetCFA
+
+Returning context->cfa in _Unwind_GetCFA makes CFA point one stack frame
+higher than what was actually used by code at context->ra. This results
+in invalid CFA value in signal frames and premature unwinding completion
+in forced unwinding used by uClibc NPTL thread cancellation.
+Returning context->sp from _Unwind_GetCFA makes all CFA values valid and
+matching code that used them.
+
+2015-08-18  Max Filippov  <[email protected]>
+libgcc/
+	* config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return
+	context->sp instead of context->cfa.
+
+Signed-off-by: Max Filippov <[email protected]>
+---
+Backported from: r226964
+
+ libgcc/config/xtensa/unwind-dw2-xtensa.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libgcc/config/xtensa/unwind-dw2-xtensa.c b/libgcc/config/xtensa/unwind-dw2-xtensa.c
+index 82b0e63..8e579c7 100644
+--- a/libgcc/config/xtensa/unwind-dw2-xtensa.c
++++ b/libgcc/config/xtensa/unwind-dw2-xtensa.c
+@@ -130,7 +130,7 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index)
+ _Unwind_Word
+ _Unwind_GetCFA (struct _Unwind_Context *context)
+ {
+-  return (_Unwind_Ptr) context->cfa;
++  return (_Unwind_Ptr) context->sp;
+ }
+ 
+ /* Overwrite the saved value for register INDEX in CONTEXT with VAL.  */
+-- 
+1.8.1.4
+
package/gcc/5.2.0/900-libitm-fixes-for-musl-support.patch new file +65 -0

65 lines not on this page · raw message

package/gcc/5.2.0/901-fixincludes-update-for-musl-support.patch new file +32 -0
new file mode 100644
index 0000000..13c08d6
@@ -0,0 +1,32 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 22 Apr 2015 14:18:16 +0000 (+0000)
+Subject: fixincludes update for musl support
+X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2dc727de2e87c2756a514cbb43cea23c99deaa3d
+
+fixincludes update for musl support
+
+On behalf of Szabolcs.Nagy at arm.com
+
+2015-04-22  Gregor Richards  <[email protected]>
+
+	* mkfixinc.sh: Add *-musl* with no fixes.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 222327 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+
+Index: b/fixincludes/mkfixinc.sh
+===================================================================
+--- a/fixincludes/mkfixinc.sh
++++ b/fixincludes/mkfixinc.sh
+@@ -19,7 +19,8 @@
+     powerpc-*-eabi*    | \
+     powerpc-*-rtems*   | \
+     powerpcle-*-eabisim* | \
+-    powerpcle-*-eabi* )
++    powerpcle-*-eabi* | \
++    *-musl* )
+ 	#  IF there is no include fixing,
+ 	#  THEN create a no-op fixer and exit
+ 	(echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
package/gcc/5.2.0/902-unwind-fix-for-musl.patch new file +36 -0
new file mode 100644
index 0000000..ef47054
@@ -0,0 +1,36 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 22 Apr 2015 14:20:01 +0000 (+0000)
+Subject: unwind fix for musl
+X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a2e31d0681d8a47389b8a3552622fbd9827bcef4
+
+unwind fix for musl
+
+On behalf of szabolcs.nagy at arm.com
+
+2015-04-22  Gregor Richards  <[email protected]>
+	    Szabolcs Nagy  <[email protected]>
+
+	* unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME): Define it on
+	Linux if target provides dl_iterate_phdr.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 222328 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+
+Index: b/libgcc/unwind-dw2-fde-dip.c
+===================================================================
+--- a/libgcc/unwind-dw2-fde-dip.c
++++ b/libgcc/unwind-dw2-fde-dip.c
+@@ -59,6 +59,12 @@
+ 
+ #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+     && defined(TARGET_DL_ITERATE_PHDR) \
++    && defined(__linux__)
++# define USE_PT_GNU_EH_FRAME
++#endif
++
++#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
++    && defined(TARGET_DL_ITERATE_PHDR) \
+     && (defined(__DragonFly__) || defined(__FreeBSD__))
+ # define ElfW __ElfN
+ # define USE_PT_GNU_EH_FRAME
package/gcc/5.2.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch new file +80 -0

80 lines not on this page · raw message

package/gcc/5.2.0/904-musl-libc-config.patch new file +285 -0

285 lines not on this page · raw message

package/gcc/5.2.0/905-add-musl-support-to-gcc.patch new file +130 -0

130 lines not on this page · raw message

package/gcc/5.2.0/906-mips-musl-support.patch new file +37 -0
new file mode 100644
index 0000000..6b473f9
@@ -0,0 +1,37 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 8 May 2015 15:16:50 +0000 (+0000)
+Subject: [PATCH 6/13] mips musl support
+X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2550b6a866c887472b587bef87d433c51cf1ebc8
+
+[PATCH 6/13] mips musl support
+
+2015-05-08  Gregor Richards  <[email protected]>
+	    Szabolcs Nagy  <[email protected]>
+
+	* config/mips/linux.h (MUSL_DYNAMIC_LINKER32): Define.
+	(MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERN32): Define.
+	(GNU_USER_DYNAMIC_LINKERN32): Update.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 222915 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+
+Index: b/gcc/config/mips/linux.h
+===================================================================
+--- a/gcc/config/mips/linux.h
++++ b/gcc/config/mips/linux.h
+@@ -37,7 +37,13 @@
+ #define UCLIBC_DYNAMIC_LINKERN32 \
+   "%{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"
++#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 BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
+ #define GNU_USER_DYNAMIC_LINKERN32 \
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
+-                         BIONIC_DYNAMIC_LINKERN32)
++                         BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32)
package/gcc/5.2.0/907-x86-musl-support.patch new file +45 -0

45 lines not on this page · raw message

package/gcc/5.2.0/908-arm-musl-support.patch new file +45 -0

45 lines not on this page · raw message

package/gcc/5.2.0/909-aarch64-musl-support.patch new file +33 -0
new file mode 100644
index 0000000..3d032f5
@@ -0,0 +1,33 @@
+From: jgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 27 May 2015 16:46:39 +0000 (+0000)
+Subject: [PATCH 3/13] aarch64 musl support
+X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=b3ff21cf0531be91bc3fb8200296a7633090ec78
+
+[PATCH 3/13] aarch64 musl support
+
+gcc/Changelog:
+
+2015-05-27  Gregor Richards  <[email protected]>
+	    Szabolcs Nagy  <[email protected]>
+
+	* config/aarch64/aarch64-linux.h (MUSL_DYNAMIC_LINKER): Define.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 223766 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+
+Index: b/gcc/config/aarch64/aarch64-linux.h
+===================================================================
+--- a/gcc/config/aarch64/aarch64-linux.h
++++ b/gcc/config/aarch64/aarch64-linux.h
+@@ -23,6 +23,9 @@
+ 
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+ 
++#undef MUSL_DYNAMIC_LINKER
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
++
+ #undef  ASAN_CC1_SPEC
+ #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
+ 
package/gcc/Config.in.host +9 -0
index cad6896..3afb79e 100644
@@ -93,6 +93,14 @@ choice
 		select BR2_GCC_SUPPORTS_GRAPHITE
 		select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 
+	config BR2_GCC_VERSION_5_2_X
+		bool "gcc 5.2.x"
+		# Broken or unsupported architectures
+		depends on !BR2_arc
+		select BR2_GCC_NEEDS_MPC
+		select BR2_GCC_SUPPORTS_GRAPHITE
+		select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+
 	config BR2_GCC_VERSION_5_X
 		bool "gcc 5.x"
 		# Broken or unsupported architectures
@@ -113,6 +121,7 @@ config BR2_GCC_VERSION
 	default "4.7.4"     if BR2_GCC_VERSION_4_7_X
 	default "4.8.5"     if BR2_GCC_VERSION_4_8_X
 	default "4.9.3"     if BR2_GCC_VERSION_4_9_X
+	default "5.2.0"     if BR2_GCC_VERSION_5_2_X
 	default "5.3.0"     if BR2_GCC_VERSION_5_X
 	default "arc-2015.12" if BR2_GCC_VERSION_4_8_ARC
 
package/gcc/gcc.hash +2 -0
index 0ef4e65..201408f 100644
@@ -6,6 +6,8 @@ sha512  dfcb737073191e628231031a3571ec77ee760a59377630f4a6e4fdfa66f9ddad39fde47e
 sha512  47fdfeca0c0a624cdec9c4ae47137d056c918d5c386d4b96985bb3c8172aba377cb66cbcc30e80832fd244a7d98f562c20198056915c70cfef0977545073a8ea  gcc-4.8.5.tar.bz2
 # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.9.3/sha512.sum
 sha512  9ac57377a6975fc7adac704ec81355262b9f537def6955576753b87715470a20ee6a2a3144a79cc8fcba3443f7b44c7337d79d704b522d053f54f79aa6b442df  gcc-4.9.3.tar.bz2
+# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-5.2.0/sha512.sum
+sha512	844120349ec04465dcea52d8ec747f1cbbc9d76a39fe3d8ef5e6b93614e63d718862d60d0a1c1cbf59ffc7815562287d0a2e536a6b220cebcd0b8de4ba35e715  gcc-5.2.0.tar.bz2
 # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-5.3.0/sha512.sum
 sha512  d619847383405fd389f5a2d7225f97fedb01f81478dbb8339047ccba7561a5c20045ab500a8744bffd19ea51892ce09fc37f862f2cfcb42de0f0f8cd8f8da37a  gcc-5.3.0.tar.bz2
 # No hash for the ARC variant, comes from the github-helper:
Signature · 1 line
2.7.1
#1 lore raw

PATCH 1/1 gcc: Add GCC 5.2.x option

Cyril,

Quoted 9 lines · Cyril Bur

GCC 5.3.x introduces a regression with PowerPC Altivec/VSX code generation.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69969

---
I'm not sure if this patch is worth the trouble. By the looks of it the GCC guys are aiming to have a fix in 5.4 and it is unlikely most users are doing things that would result in them hitting the bug.

Like we did for previous gcc versions, we only want to support one minor version at a time for a given major branch.

So at the gcc 4 era, it meant we would only package one gcc 4.8, one gcc 4.9, etc.

At the gcc >= 5 era, it means we want to package only one 5.x version, one 6.x version, etc.

If you want to fix the problem without waiting for gcc 5.4, what I can suggest is to backport the fixes for the regression you are experiencing.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
author
#2 lore raw

PATCH 1/1 gcc: Add GCC 5.2.x option

Quoted 19 lines · On Fri, 26 Feb 2016 09:37:20 +0100 Thomas Petazzoni…

Cyril,

Quoted 9 lines · Cyril Bur

GCC 5.3.x introduces a regression with PowerPC Altivec/VSX code generation.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69969

---
I'm not sure if this patch is worth the trouble. By the looks of it the GCC guys are aiming to have a fix in 5.4 and it is unlikely most users are doing things that would result in them hitting the bug.

Like we did for previous gcc versions, we only want to support one minor version at a time for a given major branch.

So at the gcc 4 era, it meant we would only package one gcc 4.8, one gcc 4.9, etc.

Quoted 6 lines

At the gcc >= 5 era, it means we want to package only one 5.x version, one 6.x version, etc.

If you want to fix the problem without waiting for gcc 5.4, what I can suggest is to backport the fixes for the regression you are experiencing.

No fix exists yet but yeah upstreaming this patch is definitely more headache in the long run, I just thought I'd put it out here - it's probably the easiest fix to this problem (for now) so in the unlikely event that anyone else hits it, hopefully they'll find this.

Thanks for the response,

Cyril

Quoted 2 lines

Thomas