From c4efcd7eaa5d7ba64b80dad06fe496de72ca8b96 Mon Sep 17 00:00:00 2001 From: spaun2002 Date: Wed, 28 Apr 2021 12:54:25 -0700 Subject: Initial commit for gcc11 Signed-off-by: Nik Konyuchenko diff --git a/packages/gcc/11.1.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc/11.1.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch new file mode 100644 index 0000000..3040e23 --- /dev/null +++ b/packages/gcc/11.1.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch @@ -0,0 +1,14 @@ +--- + libcc1/connection.cc | 1 + + 1 file changed, 1 insertion(+) + +--- a/libcc1/connection.cc ++++ b/libcc1/connection.cc +@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. + #include + #include + #include ++#include + #include + #include + #include "marshall.hh" diff --git a/packages/gcc/11.1.0/0004-arm-softfloat-libgcc.patch b/packages/gcc/11.1.0/0004-arm-softfloat-libgcc.patch new file mode 100644 index 0000000..d980036 --- /dev/null +++ b/packages/gcc/11.1.0/0004-arm-softfloat-libgcc.patch @@ -0,0 +1,31 @@ +--- + gcc/config/arm/linux-elf.h | 2 +- + libgcc/config/arm/t-linux | 7 ++++++- + 2 files changed, 7 insertions(+), 2 deletions(-) + +--- 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" + +--- 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. diff --git a/packages/gcc/11.1.0/0008-libgcc-disable-split-stack-nothreads.patch b/packages/gcc/11.1.0/0008-libgcc-disable-split-stack-nothreads.patch new file mode 100644 index 0000000..df91a9f --- /dev/null +++ b/packages/gcc/11.1.0/0008-libgcc-disable-split-stack-nothreads.patch @@ -0,0 +1,17 @@ +disable split-stack for non-thread builds + +Signed-off-by: Waldemar Brodkorb + +--- + libgcc/config/t-stack | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/libgcc/config/t-stack ++++ b/libgcc/config/t-stack +@@ -1,4 +1,6 @@ + # Makefile fragment to provide generic support for -fsplit-stack. + # This should be used in config.host for any host which supports + # -fsplit-stack. ++ifeq ($(enable_threads),yes) + LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c ++endif diff --git a/packages/gcc/11.1.0/chksum b/packages/gcc/11.1.0/chksum new file mode 100644 index 0000000..27b11e3 --- /dev/null +++ b/packages/gcc/11.1.0/chksum @@ -0,0 +1,8 @@ +md5 gcc-11.1.0.tar.gz 333068a65c119e74c9d7bfcc75a8eeba +sha1 gcc-11.1.0.tar.gz 7a6652c4c4ae5676cccf5c2eab422f1eba87517f +sha256 gcc-11.1.0.tar.gz e7abb1b4cb58aaa67c5eb49d98e89d13363b8e258ac2b5b105c197b441c09f85 +sha512 gcc-11.1.0.tar.gz cb620f779c2707bf5a42b505faf59d6d766e652bd8ca5f1fa346ef609f7de8b89beffbd3e7dd57f2c6d3df4e3d77a56fc65ac8e8c18c2c7f81d8bc6571db0612 +md5 gcc-11.1.0.tar.xz 77f6252be0861ab918042acf42bc10ff +sha1 gcc-11.1.0.tar.xz 9db7917f4ce337026335430814de0a5e991ec6c1 +sha256 gcc-11.1.0.tar.xz 4c4a6fb8a8396059241c2e674b85b351c26a5d678274007f076957afa1cc9ddf +sha512 gcc-11.1.0.tar.xz fd6bba0f67ff48069d03073d1a9b5e896383b1cfc9dde008e868e60a9ec5014a837d56af0ecbf467b3fb9b37ec74a676e819a18b44393a0a3c4280175b5d7ad8 diff --git a/packages/gcc/11.1.0/version.desc b/packages/gcc/11.1.0/version.desc new file mode 100644 index 0000000..e69de29 -- cgit v0.10.2-6-g49f6 From 37c61914ce16e5a9b175d493719b7f986bd00a84 Mon Sep 17 00:00:00 2001 From: spaun2002 Date: Wed, 28 Apr 2021 18:14:57 -0700 Subject: Pull patch for macOS from GCC 10.3.0 package. This should fix linkage error on MacOS. Signed-off-by: Nik Konyuchenko diff --git a/packages/gcc/11.1.0/0000-libtool-leave-framework-alone.patch b/packages/gcc/11.1.0/0000-libtool-leave-framework-alone.patch new file mode 100644 index 0000000..b5804ea --- /dev/null +++ b/packages/gcc/11.1.0/0000-libtool-leave-framework-alone.patch @@ -0,0 +1,18 @@ +--- + libtool-ldflags | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/libtool-ldflags ++++ b/libtool-ldflags +@@ -36,6 +36,11 @@ prev_arg= + for arg + do + case $arg in ++ -framework) ++ # libtool handles this option. It should not be prefixed with ++ # -Xcompiler, as that would split it from the argument that ++ # follows. ++ ;; + -f*|--*|-static-lib*|-shared-lib*|-B*) + # Libtool does not ascribe any special meaning options + # that begin with -f or with a double-dash. So, it will -- cgit v0.10.2-6-g49f6 From 6ca5f91fb59bb77a942e1287a6fcfec7811ffa36 Mon Sep 17 00:00:00 2001 From: spaun2002 Date: Wed, 28 Apr 2021 20:15:27 -0700 Subject: Disable -Werror for GLIBC for all ARCH for GCC11. This change replicates what GLIBC 2.23 has in the string/rawmemchr.c: // #if __GNUC_PREREQ (11, 0) // /* Likewise GCC 11, with a different warning option. */ // DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overread"); // #endif With -Werror multiple platforms failing on the string/rawmemchr.c:40 line. Signed-off-by: Nik Konyuchenko diff --git a/config/libc/glibc.in b/config/libc/glibc.in index 001cd2f..e89ed8c 100644 --- a/config/libc/glibc.in +++ b/config/libc/glibc.in @@ -403,8 +403,9 @@ config GLIBC_SSP # GCC8-related fixes were only available in glibc 2.27. config GLIBC_ENABLE_WERROR bool "Enable -Werror during the build" - depends on !(ARCH_POWERPC && ARCH_64 && GLIBC_V_2_32) - depends on !(ARCH_SPARC && GLIBC_V_2_32) + default n if GLIBC_2_32_or_later && ARCH_POWERPC && ARCH_64 + default n if GLIBC_2_32_or_later && ARCH_SPARC + default n if GLIBC_2_32_or_later && GCC_11_or_later default y if GCC_7_or_older default y if GCC_8_or_later && GLIBC_2_27_or_later help diff --git a/packages/gcc/package.desc b/packages/gcc/package.desc index a37f0c5..0ee344e 100644 --- a/packages/gcc/package.desc +++ b/packages/gcc/package.desc @@ -2,5 +2,5 @@ repository='svn svn://gcc.gnu.org/svn/gcc' mirrors='$(CT_Mirrors GNU gcc/gcc-${CT_GCC_VERSION}) $(CT_Mirrors sourceware gcc/releases/gcc-${CT_GCC_VERSION})' relevantpattern='4.*|. *|.' origin='GNU' -milestones='4.8 4.9 5 6 7 8' +milestones='4.8 4.9 5 6 7 8 11' archive_formats='.tar.xz .tar.gz' -- cgit v0.10.2-6-g49f6 From 6b465e150d1a1a2001430af684a7e2f28eebc683 Mon Sep 17 00:00:00 2001 From: spaun2002 Date: Fri, 30 Apr 2021 19:54:23 -0700 Subject: Remove m1 from multilibs for GCC11 on SH arch. GCC11 somehow has different set of multilibs on SH arch than what GCC10 had. In particular: $ gcc10 -print-multi-lib | sed -r -e 's/@/ -/g;' .; mb; -mb m2; -m2 m2e; -m2e m4; -m4 m4-single; -m4-single m4-single-only; -m4-single-only mb/m2; -mb -m2 mb/m2e; -mb -m2e mb/m4; -mb -m4 mb/m4-single; -mb -m4-single mb/m4-single-only; -mb -m4-single-only mb/m2a; -mb -m2a mb/m2a-single; -mb -m2a-single $ gcc11 -print-multi-lib | sed -r -e 's/@/ -/g;' .; mb; -mb m2; -m2 m2e; -m2e m4; -m4 m4-single; -m4-single m4-single-only; -m4-single-only mb/m1; -mb -m1 mb/m2; -mb -m2 mb/m2e; -mb -m2e mb/m4; -mb -m4 mb/m4-single; -mb -m4-single mb/m4-single-only; -mb -m4-single-only mb/m2a; -mb -m2a mb/m2a-single; -mb -m2a-single mb/m1 fails to build libgcc as libgcc uses opcodes that were not available in SH-1: libgcc/config/sh/lib1funcs.S uses 'bt/s' and 'dt' instructions that, according to https://antime.kapsi.fi/sega/files/h12p0.pdf become available in the SH-2 only. So I removed mb/m1 from the multilibs fog GCC11 and SH arch. Another option would be to try not to build libgcc for this combination of the gcc version and archichecture, but I thought this fix would be more robust. Signed-off-by: Nik Konyuchenko diff --git a/config/cc/gcc.in b/config/cc/gcc.in index c3918e8..01d7253 100644 --- a/config/cc/gcc.in +++ b/config/cc/gcc.in @@ -84,6 +84,7 @@ config CC_GCC_EXTRA_CONFIG_ARRAY config CC_GCC_MULTILIB_LIST string "List of multilib variants" depends on MULTILIB + default "m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single" if GCC_V_11 && ARCH_SH help Architecture-specific option of expanding or restricting the list of the multilib variants to be built. Refer to GCC installation manual -- cgit v0.10.2-6-g49f6 From 0cf01b55a6424f0b02b9ac7305b8c067a31c72e9 Mon Sep 17 00:00:00 2001 From: spaun2002 Date: Sat, 1 May 2021 01:21:42 -0700 Subject: Fix dynamic exception specifications in DUMA tests. GCC11 now have -std=c++17 by default and c++17 does not allow dynamic exception specifications. Signed-off-by: Nik Konyuchenko diff --git a/packages/duma/2_5_15/0003_cpp17_throw.patch b/packages/duma/2_5_15/0003_cpp17_throw.patch new file mode 100644 index 0000000..d61bd49 --- /dev/null +++ b/packages/duma/2_5_15/0003_cpp17_throw.patch @@ -0,0 +1,69 @@ +--- a/testoperators.cpp 2009-03-17 16:04:43.000000000 -0700 ++++ b/testoperators.cpp 2021-05-01 01:15:25.385421628 -0700 +@@ -37,26 +37,26 @@ + { + public: + /* 1x : SINGLE OBJECT FORM - NO DEBUG INFORMATION */ +- void * operator new( DUMA_SIZE_T ) throw(std::bad_alloc); ++ void * operator new( DUMA_SIZE_T ) NEW_THROW_SPEC; + void * operator new( DUMA_SIZE_T , const std::nothrow_t & ) throw(); + void operator delete( void * ) throw(); + void operator delete( void * , const std::nothrow_t & ) throw(); + + /* 2x : ARRAY OBJECT FORM - NO DEBUG INFORMATION */ +- void * operator new[]( DUMA_SIZE_T ) throw(std::bad_alloc); ++ void * operator new[]( DUMA_SIZE_T ) NEW_THROW_SPEC; + void * operator new[]( DUMA_SIZE_T , const std::nothrow_t & ) throw(); + void operator delete[]( void * ) throw(); + void operator delete[]( void *, const std::nothrow_t & ) throw(); + + #ifndef DUMA_NO_LEAKDETECTION + /* 3x : SINGLE OBJECT FORM - WITH DEBUG INFORMATION */ +- void * operator new( DUMA_SIZE_T, const char *, int ) throw( std::bad_alloc ); ++ void * operator new( DUMA_SIZE_T, const char *, int ) NEW_THROW_SPEC; + void * operator new( DUMA_SIZE_T, const std::nothrow_t &, const char *, int ) throw(); + void operator delete( void *, const char *, int ) throw(); + void operator delete( void *, const std::nothrow_t &, const char *, int ) throw(); + + /* 4x : ARRAY OBJECT FORM - WITH DEBUG INFORMATION */ +- void * operator new[]( DUMA_SIZE_T, const char *, int ) throw( std::bad_alloc ); ++ void * operator new[]( DUMA_SIZE_T, const char *, int ) NEW_THROW_SPEC; + void * operator new[]( DUMA_SIZE_T, const std::nothrow_t &, const char *, int ) throw(); + void operator delete[]( void *, const char *, int ) throw(); + void operator delete[]( void *, const std::nothrow_t &, const char *, int ) throw(); +@@ -70,7 +70,7 @@ + /* 1x : SINGLE OBJECT FORM - NO DEBUG INFORMATION */ + + void * optest::operator new( DUMA_SIZE_T s ) +-throw(std::bad_alloc) ++NEW_THROW_SPEC + { + (void)s; + return ::new optest; +@@ -101,7 +101,7 @@ + + /* 2x : ARRAY OBJECT FORM - NO DEBUG INFORMATION */ + void * optest::operator new[]( DUMA_SIZE_T s ) +-throw(std::bad_alloc) ++NEW_THROW_SPEC + { + return ::new optest[ s / sizeof(optest) ]; // "s / sizeof()" not correct but works for this test + } +@@ -129,7 +129,7 @@ + + /* 3x : SINGLE OBJECT FORM - WITH DEBUG INFORMATION */ + void * optest::operator new( DUMA_SIZE_T s, const char * f, int l ) +-throw( std::bad_alloc ) ++NEW_THROW_SPEC + { + (void)s; + return ::new(f,l) optest; +@@ -157,7 +157,7 @@ + + /* 4x : ARRAY OBJECT FORM - WITH DEBUG INFORMATION */ + void * optest::operator new[]( DUMA_SIZE_T s, const char * f, int l ) +-throw( std::bad_alloc ) ++NEW_THROW_SPEC + { + return ::new(f,l) optest[s / sizeof(optest)]; // "s / sizeof()" not correct but works for this test + } -- cgit v0.10.2-6-g49f6