gcc: add support for gcc 6 (release candidate)
RFC PATCH 1/1 gcc: add support for gcc 6 (release candidate)
NOTE: this is not meant for merging, since gcc 6 has not been released. It is only meant for testing by interested people.
This commit adds the support for gcc 6, presently available as a release candidate. This release allows to remove a large number of our gcc patches, mainly thanks to the Xtensa and musl related patches being merged upstream.
Patches kept with no changes:
100-uclibc-conf.patch 301-missing-execinfo_h.patch 810-arm-softfloat-libgcc.patch 830-arm_unbreak_armv4t.patch 840-microblaze-enable-dwarf-eh-support.patch 860-cilk-wchar.patch 890-fix-m68k-compile.patch 902-unwind-fix-for-musl.patch --> weird to be checked
Patches dropped because they have been merged upstream, or were already upstream backports:
120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch (merged) 850-libstdcxx-uclibc-c99.patch (merged in a different form, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393)
870-xtensa-add-mauto-litpools-option.patch (upstream backport) 871-xtensa-reimplement-register-spilling.patch (upstream backport) 872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch (upstream backport) 873-xtensa-fix-_Unwind_GetCFA.patch (upstream backport) 874-xtensa-add-uclinux-support.patch (upstream backport) 900-libitm-fixes-for-musl-support.patch (upstream backport) 901-fixincludes-update-for-musl-support.patch (upstream backport) 902-unwind-fix-for-musl.patch (upstream backport) 903-libstdc++-libgfortran-gthr-workaround-for-musl.patch (upstream backport) 904-musl-libc-config.patch (upstream backport) 905-add-musl-support-to-gcc.patch (upstream backport) 905-add-musl-support-to-gcc.patch (upstream backport) 906-mips-musl-support.patch (upstream backport) 907-x86-musl-support.patch (upstream backport) 908-arm-musl-support.patch (upstream backport) 909-aarch64-musl-support.patch (upstream backport)
Successfully build-time and run-time tested with qemu_arm_vexpress_defconfig, using gcc 6.x, both in uClibc and musl configurations.
--- .../gcc/6.0.1-RC-20160415/100-uclibc-conf.patch | 15 ++ .../6.0.1-RC-20160415/301-missing-execinfo_h.patch | 13 ++ .../810-arm-softfloat-libgcc.patch | 30 ++++ .../6.0.1-RC-20160415/830-arm_unbreak_armv4t.patch | 15 ++ .../840-microblaze-enable-dwarf-eh-support.patch | 166 +++++++++++++++++++++ package/gcc/6.0.1-RC-20160415/860-cilk-wchar.patch | 56 +++++++ .../6.0.1-RC-20160415/890-fix-m68k-compile.patch | 15 ++ package/gcc/Config.in.host | 9 ++ package/gcc/gcc.hash | 2 + package/gcc/gcc.mk | 2 + toolchain/toolchain-common.in | 5 + 11 files changed, 328 insertions(+) create mode 100644 package/gcc/6.0.1-RC-20160415/100-uclibc-conf.patch create mode 100644 package/gcc/6.0.1-RC-20160415/301-missing-execinfo_h.patch create mode 100644 package/gcc/6.0.1-RC-20160415/810-arm-softfloat-libgcc.patch create mode 100644 package/gcc/6.0.1-RC-20160415/830-arm_unbreak_armv4t.patch create mode 100644 package/gcc/6.0.1-RC-20160415/840-microblaze-enable-dwarf-eh-support.patch create mode 100644 package/gcc/6.0.1-RC-20160415/860-cilk-wchar.patch create mode 100644 package/gcc/6.0.1-RC-20160415/890-fix-m68k-compile.patch
package/gcc/6.0.1-RC-20160415/100-uclibc-conf.patch new file +15 -0
@@ -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/6.0.1-RC-20160415/301-missing-execinfo_h.patch new file +13 -0
@@ -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/6.0.1-RC-20160415/810-arm-softfloat-libgcc.patch new file +30 -0
@@ -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/6.0.1-RC-20160415/830-arm_unbreak_armv4t.patch new file +15 -0
@@ -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/6.0.1-RC-20160415/840-microblaze-enable-dwarf-eh-support.patch new file +166 -0
166 lines not on this page · raw message
package/gcc/6.0.1-RC-20160415/860-cilk-wchar.patch new file +56 -0
56 lines not on this page · raw message
package/gcc/6.0.1-RC-20160415/890-fix-m68k-compile.patch new file +15 -0
@@ -0,0 +1,15 @@ +remove unused header, which breaks the toolchain building + +Signed-off-by: Waldemar Brodkorb <[email protected]> + +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
package/gcc/Config.in.host +9 -0
@@ -79,6 +79,14 @@ choice select BR2_GCC_SUPPORTS_GRAPHITE select BR2_TOOLCHAIN_GCC_AT_LEAST_5 + config BR2_GCC_VERSION_6_X + bool "gcc 6.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_6 + endchoice config BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE
@@ -91,6 +99,7 @@ config BR2_GCC_VERSION default "4.8.5" if BR2_GCC_VERSION_4_8_X default "4.9.3" if BR2_GCC_VERSION_4_9_X default "5.3.0" if BR2_GCC_VERSION_5_X + default "6.0.1-RC-20160415" if BR2_GCC_VERSION_6_X default "arc-2015.12" if BR2_GCC_VERSION_4_8_ARC config BR2_EXTRA_GCC_CONFIG_OPTIONS
package/gcc/gcc.hash +2 -0
@@ -8,5 +8,7 @@ sha512 47fdfeca0c0a624cdec9c4ae47137d056c918d5c386d4b96985bb3c8172aba377cb66cbc sha512 9ac57377a6975fc7adac704ec81355262b9f537def6955576753b87715470a20ee6a2a3144a79cc8fcba3443f7b44c7337d79d704b522d053f54f79aa6b442df gcc-4.9.3.tar.bz2 # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-5.3.0/sha512.sum sha512 d619847383405fd389f5a2d7225f97fedb01f81478dbb8339047ccba7561a5c20045ab500a8744bffd19ea51892ce09fc37f862f2cfcb42de0f0f8cd8f8da37a gcc-5.3.0.tar.bz2 +# From ftp://gcc.gnu.org/pub/gcc/snapshots/6.0.1-RC-20160415/sha512.sum +sha512 5c03c1a74cc762c2421cd9b5818deca6e6191a19ebe07eaa407e152cd1d4341eed5e15ed9a35d8e372891574d492fb67d0885ce302dcf5d71c89021b0f420c40 gcc-6.0.1-RC-20160415.tar.bz2 # No hash for the ARC variant, comes from the github-helper: none xxx gcc-arc-2015.12.tar.gz
package/gcc/gcc.mk +2 -0
@@ -13,6 +13,8 @@ GCC_VERSION = $(call qstrip,$(BR2_GCC_VERSION)) ifeq ($(BR2_arc),y) GCC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,gcc,$(GCC_VERSION)) GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz +else ifeq ($(BR2_GCC_VERSION_6_X),y) +GCC_SITE = ftp://gcc.gnu.org/pub/gcc/snapshots/$(GCC_VERSION) else GCC_SITE = $(BR2_GNU_MIRROR:/=)/gcc/gcc-$(GCC_VERSION) endif
toolchain/toolchain-common.in +5 -0
@@ -300,10 +300,15 @@ config BR2_TOOLCHAIN_GCC_AT_LEAST_5 bool select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 +config BR2_TOOLCHAIN_GCC_AT_LEAST_6 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_5 + # This order guarantees that the highest version is set, as kconfig # stops affecting a value on the first matching default. config BR2_TOOLCHAIN_GCC_AT_LEAST string + default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6 default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5 default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
Signature · 1 line
2.6.4
RFC PATCH 1/1 gcc: add support for gcc 6 (release candidate)
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
NOTE: this is not meant for merging, since gcc 6 has not been released. It is only meant for testing by interested people.
This commit adds the support for gcc 6, presently available as a release candidate. This release allows to remove a large number of our gcc patches, mainly thanks to the Xtensa and musl related patches being merged upstream.
Wee!
Thanks, looks nice.
Signature · 1 line
Bye, Peter Korsgaard