package/gcc: add support for gcc 7
Remove upstream patches:
831-ARM-PR-target-70473-Reduce-size-of-Cortex-A8-automat.patch
870-xtensa-Fix-PR-target-78118.patch
871-xtensa-Fix-PR-target-78603.patch
890-fix-m68k-compile.patch:
https://github.com/gcc-mirror/gcc/commit/1701058da920d27de87dc82e8d327b8ca930e997
892-libgcc-mkmap-symver-support-skip_underscore.patch:
https://github.com/gcc-mirror/gcc/commit/6c8f362e1f17cce05131eb8ff53963d64bc69484
893-libgcc-config-bfin-use-the-generic-linker-version-in.patch:
https://github.com/gcc-mirror/gcc/commit/966d046c08ba50fc988ac614f84f2d49c1546e28
894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch:
https://github.com/gcc-mirror/gcc/commit/397d0e43abb943f1fe57801220e7e46bc6636c7c
895-bfin-define-REENTRANT.patch:
https://github.com/gcc-mirror/gcc/commit/da89a4dcdf75bc3134f73520535c949bbbb0c845
940-uclinux-enable-threads.patch:
https://github.com/gcc-mirror/gcc/commit/b9ce54109ec78d18f6123a1e54aae1293bede716
941-mips-Add-support-for-mips-r6-musl.patch:
https://github.com/gcc-mirror/gcc/commit/83717065090bb8b954556d1216dd9dc397dc0243
Remove obsolete patches:
301-missing-execinfo_h.patch: boehm-gc removed from gcc sources:
https://github.com/gcc-mirror/gcc/commit/baf71228766058f5541d929891237d394376c975
830-arm_unbreak_armv4t.patch: SUBTARGET_CPU_DEFAULT removed:
https://github.com/gcc-mirror/gcc/commit/ff3caa3ade14a42d5ab7e81cbd3605fe15aa998d
Add a new patch to allow to build gcc 7.1 without extracting gcc/testsuite directory.
---
Build tested with musl and glibc.
While testing with uClibc-ng 1.0.24, the gcc-final fail to build with the following error:
../../../../libstdc++-v3/libsupc++/new_opa.cc: In function ?void* operator new(std::size_t, std::align_val_t)?:
../../../../libstdc++-v3/libsupc++/new_opa.cc:103:33: error: ?aligned_alloc? was not declared in this scope
while (__builtin_expect ((p = aligned_alloc (align, sz)) == 0, false))
^~~~~~~~~~~~~
From libstdc++-v3/config.log:
conftest.c:185:6: warning: conflicting types for built-in function 'aligned_alloc' [-Wbuiltin-declaration-mismatch]
char aligned_alloc ();
^~~~~~~~~~~~~configure:59951: $? = 0
configure:59951: result: yes
Waldemar, you worked on aligned_alloc() recently [1], do you have an idea?
Best regards,
Romain
[1] https://cgit.openadk.org/cgi/cgit/uclibc-ng.git/commit/?id=cee0b058fa0b4501b289a2da365182d60314d746
--- package/gcc/7.1.0/0100-uclibc-conf.patch | 29 ++++++ package/gcc/7.1.0/0810-arm-softfloat-libgcc.patch | 45 +++++++++ .../7.1.0/0860-cilk-fix-build-without-wchar.patch | 64 ++++++++++++ package/gcc/7.1.0/0891-fix-m68k-uclinux.patch | 30 ++++++ package/gcc/7.1.0/0900-remove-selftests.patch | 111 +++++++++++++++++++++ package/gcc/Config.in.host | 11 ++ package/gcc/gcc.hash | 2 + toolchain/toolchain-common.in | 5 + 8 files changed, 297 insertions(+) create mode 100644 package/gcc/7.1.0/0100-uclibc-conf.patch create mode 100644 package/gcc/7.1.0/0810-arm-softfloat-libgcc.patch create mode 100644 package/gcc/7.1.0/0860-cilk-fix-build-without-wchar.patch create mode 100644 package/gcc/7.1.0/0891-fix-m68k-uclinux.patch create mode 100644 package/gcc/7.1.0/0900-remove-selftests.patch
package/gcc/7.1.0/0100-uclibc-conf.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 326b880b20e5f8187dbda736b4c4c662cbfb00ca Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +Date: Tue, 2 May 2017 22:36:15 +0200 +Subject: [PATCH] uclibc-conf + +[Romain: convert to git patch] +Signed-off-by: Romain Naour <[email protected]> +--- + 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 +
package/gcc/7.1.0/0810-arm-softfloat-libgcc.patch new file +45 -0
45 lines not on this page · raw message
package/gcc/7.1.0/0860-cilk-fix-build-without-wchar.patch new file +64 -0
64 lines not on this page · raw message
package/gcc/7.1.0/0891-fix-m68k-uclinux.patch new file +30 -0
@@ -0,0 +1,30 @@ +From c2773170a1b0e2728f71f2275a99fd177ba2cef4 Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +Date: Tue, 2 May 2017 23:25:17 +0200 +Subject: [PATCH] fix m68k uclinux avoids internal compiler error while + compiling linux-atomic.c See here: + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833 + +Signed-off-by: Waldemar Brodkorb <[email protected]> +[Romain: convert to git patch] +Signed-off-by: Romain Naour <[email protected]> +--- + libgcc/config.host | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgcc/config.host b/libgcc/config.host +index b279a64..04fe183 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -820,7 +820,7 @@ m68k*-*-netbsdelf*) + m68k*-*-openbsd*) + ;; + m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc +- tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux" ++ tmake_file="$tmake_file m68k/t-floatlib" + md_unwind_header=m68k/linux-unwind.h + ;; + m68k-*-linux*) # Motorola m68k's running GNU/Linux +-- +2.9.3 +
package/gcc/7.1.0/0900-remove-selftests.patch new file +111 -0
111 lines not on this page · raw message
package/gcc/Config.in.host +11 -0
@@ -87,6 +87,16 @@ config BR2_GCC_VERSION_6_X depends on !BR2_mips_m6250 && !BR2_mips_p6600 select BR2_TOOLCHAIN_GCC_AT_LEAST_6 +config BR2_GCC_VERSION_7_X + bool "gcc 7.x" + # Broken or unsupported architectures + depends on !BR2_arc + depends on !BR2_microblaze + depends on !BR2_or1k + # Unsupported MIPS cores + depends on !BR2_mips_m6250 && !BR2_mips_p6600 + select BR2_TOOLCHAIN_GCC_AT_LEAST_7 + endchoice # Indicates if GCC for architecture supports --with-{arch,cpu,..} to
@@ -106,6 +116,7 @@ config BR2_GCC_VERSION default "4.9.4" if BR2_GCC_VERSION_4_9_X default "5.4.0" if BR2_GCC_VERSION_5_X default "6.3.0" if BR2_GCC_VERSION_6_X + default "7.1.0" if BR2_GCC_VERSION_7_X default "arc-2017.03-rc1" if BR2_GCC_VERSION_ARC default "musl-5.4.0" if BR2_GCC_VERSION_OR1K
package/gcc/gcc.hash +2 -0
@@ -10,6 +10,8 @@ sha512 93abb78e16277454f41a8e9810f41f66c0fdffdc539a762ff6b67d3037f78db971378683 sha512 2941cc950c8f2409a314df497631f9b0266211aa74746c1839c46e04f1c7c299afe2528d1ef16ea39def408a644ba48f97519ec7a7dd37d260c3e9423514265b gcc-5.4.0.tar.bz2 # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-6.3.0/sha512.sum sha512 234dd9b1bdc9a9c6e352216a7ef4ccadc6c07f156006a59759c5e0e6a69f0abcdc14630eff11e3826dd6ba5933a8faa43043f3d1d62df6bd5ab1e82862f9bf78 gcc-6.3.0.tar.bz2 +# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-7.1.0/sha512.sum +sha512 b5d952be9a10f0e0926bb2868877d10544039d6d2f35ba0a08f51231dd622a007650764a03e173194701467547789ad7d2d9cbc10adcdf118d619cdedbd14aec gcc-7.1.0.tar.bz2 # Locally calculated (fetched from Github) sha512 e4fe5a179b8feabf932a8a6f4794ff6907b868a65487412d855a4b3671aa24ec8544a44f3b63e69ea2c12fcd4d8028d0619d40bf016ee7c1a5b5a99aa9315ef3 gcc-arc-2017.03-rc1.tar.gz
toolchain/toolchain-common.in +5 -0
@@ -324,10 +324,15 @@ config BR2_TOOLCHAIN_GCC_AT_LEAST_6 bool select BR2_TOOLCHAIN_GCC_AT_LEAST_5 +config BR2_TOOLCHAIN_GCC_AT_LEAST_7 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_6 + # 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 "7" if BR2_TOOLCHAIN_GCC_AT_LEAST_7 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
Signature · 1 line
2.9.3
Hi Romain,
can you try attached patch?
It is for uClibc-ng.
best regards
Waldemar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-sync-features.h-with-GNU-C-library-fixes-gcc-7.1-too.patch
Type: text/x-diff
Size: 1983 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170507/0bdf7d4e/attachment.bin>
Hi Waldemar,
Le 07/05/2017 ? 16:30, Waldemar Brodkorb a ?crit :
Quoted 4 lines
Hi Romain,
can you try attached patch?
It is for uClibc-ng.
efl, enlightenment, lugaru, supertux, minetest, supertuxkart, all the system complied with gcc 7 and uclibc + your patch runtime tested successfully :)
I'll keep this setting for further runtime testing with uClibc-ng on real hardware (x86_64 PC target).
Best regards,
Romain
Quoted 4 lines
best regards
Waldemar