From 3c94c6c67832aef663e336cef1bd04cccfeb3f47 Mon Sep 17 00:00:00 2001 From: Hans-Christian Noren Egtvedt Date: Fri, 22 Apr 2022 00:03:38 +0200 Subject: gcc: bump GCC 11 to latest release 11.3.0 Remove patches applied upstream we no longer need to maintain here. Signed-off-by: Hans-Christian Noren Egtvedt --- .../0000-libtool-leave-framework-alone.patch | 18 -- ...001-gcc-plugin-POSIX-include-sys-select-h.patch | 14 -- .../gcc/11.2.0/0002-arm-softfloat-libgcc.patch | 31 --- ...0003-libgcc-disable-split-stack-nothreads.patch | 17 -- ...Remove-use-of-include_next-from-c-headers.patch | 262 --------------------- ...dc-Add-nostdinc-for-c-17-sources-PR100017.patch | 71 ------ .../gcc/11.2.0/0006-arc-Update-ZOL-pattern.patch | 44 ---- .../0007-arc-Update-u-maddhisi4-patterns.patch | 115 --------- .../11.2.0/0008-arc-Fix-maddhisi-patterns.patch | 126 ---------- ...h64-Initial-support-for-the-self-host-dri.patch | 88 ------- ...ck-for-TLS-support-on-mingw-cross-compile.patch | 251 -------------------- ...c-Fix-asm-machine-directive-for-some-CPUs.patch | 59 ----- ...012-c-designator-and-anon-struct-PR101767.patch | 71 ------ ...nated-init-and-aggregate-members-PR103337.patch | 240 ------------------- packages/gcc/11.2.0/chksum | 8 - packages/gcc/11.2.0/version.desc | 0 .../0000-libtool-leave-framework-alone.patch | 18 ++ ...001-gcc-plugin-POSIX-include-sys-select-h.patch | 14 ++ .../gcc/11.3.0/0002-arm-softfloat-libgcc.patch | 31 +++ ...0003-libgcc-disable-split-stack-nothreads.patch | 17 ++ ...Remove-use-of-include_next-from-c-headers.patch | 262 +++++++++++++++++++++ .../gcc/11.3.0/0005-arc-Update-ZOL-pattern.patch | 44 ++++ .../0006-arc-Update-u-maddhisi4-patterns.patch | 115 +++++++++ .../11.3.0/0007-arc-Fix-maddhisi-patterns.patch | 126 ++++++++++ ...h64-Initial-support-for-the-self-host-dri.patch | 88 +++++++ ...ck-for-TLS-support-on-mingw-cross-compile.patch | 244 +++++++++++++++++++ packages/gcc/11.3.0/chksum | 8 + packages/gcc/11.3.0/version.desc | 0 28 files changed, 967 insertions(+), 1415 deletions(-) delete mode 100644 packages/gcc/11.2.0/0000-libtool-leave-framework-alone.patch delete mode 100644 packages/gcc/11.2.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch delete mode 100644 packages/gcc/11.2.0/0002-arm-softfloat-libgcc.patch delete mode 100644 packages/gcc/11.2.0/0003-libgcc-disable-split-stack-nothreads.patch delete mode 100644 packages/gcc/11.2.0/0004-Remove-use-of-include_next-from-c-headers.patch delete mode 100644 packages/gcc/11.2.0/0005-libstdc-Add-nostdinc-for-c-17-sources-PR100017.patch delete mode 100644 packages/gcc/11.2.0/0006-arc-Update-ZOL-pattern.patch delete mode 100644 packages/gcc/11.2.0/0007-arc-Update-u-maddhisi4-patterns.patch delete mode 100644 packages/gcc/11.2.0/0008-arc-Fix-maddhisi-patterns.patch delete mode 100644 packages/gcc/11.2.0/0009-Darwin-aarch64-Initial-support-for-the-self-host-dri.patch delete mode 100644 packages/gcc/11.2.0/0010-libstdc-Check-for-TLS-support-on-mingw-cross-compile.patch delete mode 100644 packages/gcc/11.2.0/0011-powerpc-Fix-asm-machine-directive-for-some-CPUs.patch delete mode 100644 packages/gcc/11.2.0/0012-c-designator-and-anon-struct-PR101767.patch delete mode 100644 packages/gcc/11.2.0/0013-c-designated-init-and-aggregate-members-PR103337.patch delete mode 100644 packages/gcc/11.2.0/chksum delete mode 100644 packages/gcc/11.2.0/version.desc create mode 100644 packages/gcc/11.3.0/0000-libtool-leave-framework-alone.patch create mode 100644 packages/gcc/11.3.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch create mode 100644 packages/gcc/11.3.0/0002-arm-softfloat-libgcc.patch create mode 100644 packages/gcc/11.3.0/0003-libgcc-disable-split-stack-nothreads.patch create mode 100644 packages/gcc/11.3.0/0004-Remove-use-of-include_next-from-c-headers.patch create mode 100644 packages/gcc/11.3.0/0005-arc-Update-ZOL-pattern.patch create mode 100644 packages/gcc/11.3.0/0006-arc-Update-u-maddhisi4-patterns.patch create mode 100644 packages/gcc/11.3.0/0007-arc-Fix-maddhisi-patterns.patch create mode 100644 packages/gcc/11.3.0/0008-Darwin-aarch64-Initial-support-for-the-self-host-dri.patch create mode 100644 packages/gcc/11.3.0/0009-libstdc-Check-for-TLS-support-on-mingw-cross-compile.patch create mode 100644 packages/gcc/11.3.0/chksum create mode 100644 packages/gcc/11.3.0/version.desc (limited to 'packages/gcc') diff --git a/packages/gcc/11.2.0/0000-libtool-leave-framework-alone.patch b/packages/gcc/11.2.0/0000-libtool-leave-framework-alone.patch deleted file mode 100644 index 1a86e415..00000000 --- a/packages/gcc/11.2.0/0000-libtool-leave-framework-alone.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- - libtool-ldflags | 5 +++++ - 1 file changed, 5 insertions(+) - ---- a/libtool-ldflags -+++ b/libtool-ldflags -@@ -36,6 +36,11 @@ - 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 diff --git a/packages/gcc/11.2.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc/11.2.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch deleted file mode 100644 index 5f9a07a2..00000000 --- a/packages/gcc/11.2.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- - libcc1/connection.cc | 1 + - 1 file changed, 1 insertion(+) - ---- a/libcc1/connection.cc -+++ b/libcc1/connection.cc -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - #include - #include - #include "marshall.hh" diff --git a/packages/gcc/11.2.0/0002-arm-softfloat-libgcc.patch b/packages/gcc/11.2.0/0002-arm-softfloat-libgcc.patch deleted file mode 100644 index d9800365..00000000 --- a/packages/gcc/11.2.0/0002-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- - 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.2.0/0003-libgcc-disable-split-stack-nothreads.patch b/packages/gcc/11.2.0/0003-libgcc-disable-split-stack-nothreads.patch deleted file mode 100644 index df91a9ff..00000000 --- a/packages/gcc/11.2.0/0003-libgcc-disable-split-stack-nothreads.patch +++ /dev/null @@ -1,17 +0,0 @@ -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.2.0/0004-Remove-use-of-include_next-from-c-headers.patch b/packages/gcc/11.2.0/0004-Remove-use-of-include_next-from-c-headers.patch deleted file mode 100644 index 920e64da..00000000 --- a/packages/gcc/11.2.0/0004-Remove-use-of-include_next-from-c-headers.patch +++ /dev/null @@ -1,262 +0,0 @@ -From 9db1164d68ee1da7434af48db4f828d7df51b055 Mon Sep 17 00:00:00 2001 -From: Keith Packard -Date: Sun, 24 Jan 2021 14:20:33 -0800 -Subject: [PATCH] Remove use of include_next from c++ headers - -Using include_next bypasses the default header search path and lets -files later in the include path take priority over earlier files. - -This makes replacing libc impossible as the default libc headers will -occur after the libstdc++ headers, and so be picked up in place of -headers inserted at the begining of the search path or appended to the -end of the search path. - -Using include_next is a hack to work-around broken combinations of -libraries, and is not necessary in a well constructed toolchain. - -Signed-off-by: Keith Packard ---- - libstdc++-v3/include/bits/std_abs.h | 4 ++-- - libstdc++-v3/include/c/cassert | 2 +- - libstdc++-v3/include/c/cctype | 2 +- - libstdc++-v3/include/c/cerrno | 2 +- - libstdc++-v3/include/c/cfloat | 2 +- - libstdc++-v3/include/c/climits | 2 +- - libstdc++-v3/include/c/clocale | 2 +- - libstdc++-v3/include/c/cmath | 2 +- - libstdc++-v3/include/c/csetjmp | 2 +- - libstdc++-v3/include/c/csignal | 2 +- - libstdc++-v3/include/c/cstdarg | 2 +- - libstdc++-v3/include/c/cstddef | 2 +- - libstdc++-v3/include/c/cstdio | 2 +- - libstdc++-v3/include/c/cstdlib | 2 +- - libstdc++-v3/include/c/cstring | 2 +- - libstdc++-v3/include/c/ctime | 2 +- - libstdc++-v3/include/c/cuchar | 2 +- - libstdc++-v3/include/c/cwchar | 2 +- - libstdc++-v3/include/c/cwctype | 2 +- - libstdc++-v3/include/c_global/cmath | 2 +- - libstdc++-v3/include/c_global/cstdlib | 2 +- - 21 files changed, 22 insertions(+), 22 deletions(-) - ---- a/libstdc++-v3/include/bits/std_abs.h -+++ b/libstdc++-v3/include/bits/std_abs.h -@@ -35,9 +35,9 @@ - #include - - #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS --#include_next -+#include - #ifdef __CORRECT_ISO_CPP_MATH_H_PROTO --# include_next -+# include - #endif - #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS - ---- a/libstdc++-v3/include/c/cassert -+++ b/libstdc++-v3/include/c/cassert -@@ -31,4 +31,4 @@ - #pragma GCC system_header - - #include --#include_next -+#include ---- a/libstdc++-v3/include/c/cctype -+++ b/libstdc++-v3/include/c/cctype -@@ -31,6 +31,6 @@ - - #pragma GCC system_header - --#include_next -+#include - - #endif ---- a/libstdc++-v3/include/c/cerrno -+++ b/libstdc++-v3/include/c/cerrno -@@ -41,7 +41,7 @@ - #pragma GCC system_header - - #include --#include_next -+#include - - // Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 - #ifndef errno ---- a/libstdc++-v3/include/c/cfloat -+++ b/libstdc++-v3/include/c/cfloat -@@ -32,6 +32,6 @@ - #pragma GCC system_header - - #include --#include_next -+#include - - #endif ---- a/libstdc++-v3/include/c/climits -+++ b/libstdc++-v3/include/c/climits -@@ -32,6 +32,6 @@ - #pragma GCC system_header - - #include --#include_next -+#include - - #endif ---- a/libstdc++-v3/include/c/clocale -+++ b/libstdc++-v3/include/c/clocale -@@ -31,6 +31,6 @@ - - #pragma GCC system_header - --#include_next -+#include - - #endif ---- a/libstdc++-v3/include/c/cmath -+++ b/libstdc++-v3/include/c/cmath -@@ -33,7 +33,7 @@ - - #include - --#include_next -+#include - - // Get rid of those macros defined in in lieu of real functions. - #undef abs ---- a/libstdc++-v3/include/c/csetjmp -+++ b/libstdc++-v3/include/c/csetjmp -@@ -31,7 +31,7 @@ - - #pragma GCC system_header - --#include_next -+#include - - // Get rid of those macros defined in in lieu of real functions. - #undef longjmp ---- a/libstdc++-v3/include/c/csignal -+++ b/libstdc++-v3/include/c/csignal -@@ -31,6 +31,6 @@ - - #pragma GCC system_header - --#include_next -+#include - - #endif ---- a/libstdc++-v3/include/c/cstdarg -+++ b/libstdc++-v3/include/c/cstdarg -@@ -32,6 +32,6 @@ - #pragma GCC system_header - - #undef __need___va_list --#include_next -+#include - - #endif ---- a/libstdc++-v3/include/c/cstddef -+++ b/libstdc++-v3/include/c/cstddef -@@ -35,6 +35,6 @@ - #define __need_ptrdiff_t - #define __need_NULL - #define __need_offsetof --#include_next -+#include - - #endif ---- a/libstdc++-v3/include/c/cstdio -+++ b/libstdc++-v3/include/c/cstdio -@@ -31,7 +31,7 @@ - - #pragma GCC system_header - --#include_next -+#include - - // Get rid of those macros defined in in lieu of real functions. - #undef clearerr ---- a/libstdc++-v3/include/c/cstdlib -+++ b/libstdc++-v3/include/c/cstdlib -@@ -31,6 +31,6 @@ - - #pragma GCC system_header - --#include_next -+#include - - #endif ---- a/libstdc++-v3/include/c/cstring -+++ b/libstdc++-v3/include/c/cstring -@@ -31,6 +31,6 @@ - - #pragma GCC system_header - --#include_next -+#include - - #endif ---- a/libstdc++-v3/include/c/ctime -+++ b/libstdc++-v3/include/c/ctime -@@ -31,6 +31,6 @@ - - #pragma GCC system_header - --#include_next -+#include - - #endif ---- a/libstdc++-v3/include/c/cuchar -+++ b/libstdc++-v3/include/c/cuchar -@@ -39,7 +39,7 @@ - #include - - #if _GLIBCXX_USE_C11_UCHAR_CXX11 --# include_next -+# include - #endif - - #endif // C++11 ---- a/libstdc++-v3/include/c/cwchar -+++ b/libstdc++-v3/include/c/cwchar -@@ -36,7 +36,7 @@ - #include - - #if _GLIBCXX_HAVE_WCHAR_H --#include_next -+#include - #endif - - // Need to do a bit of trickery here with mbstate_t as char_traits ---- a/libstdc++-v3/include/c/cwctype -+++ b/libstdc++-v3/include/c/cwctype -@@ -34,7 +34,7 @@ - #include - - #if _GLIBCXX_HAVE_WCTYPE_H --#include_next -+#include - #endif - - #endif ---- a/libstdc++-v3/include/c_global/cmath -+++ b/libstdc++-v3/include/c_global/cmath -@@ -42,7 +42,7 @@ - #include - #include - #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS --#include_next -+#include - #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS - #include - ---- a/libstdc++-v3/include/c_global/cstdlib -+++ b/libstdc++-v3/include/c_global/cstdlib -@@ -72,7 +72,7 @@ - // Need to ensure this finds the C library's not a libstdc++ - // wrapper that might already be installed later in the include search path. - #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS --#include_next -+#include - #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS - #include - diff --git a/packages/gcc/11.2.0/0005-libstdc-Add-nostdinc-for-c-17-sources-PR100017.patch b/packages/gcc/11.2.0/0005-libstdc-Add-nostdinc-for-c-17-sources-PR100017.patch deleted file mode 100644 index 4a4daf65..00000000 --- a/packages/gcc/11.2.0/0005-libstdc-Add-nostdinc-for-c-17-sources-PR100017.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 4fde88e5dd152fe866a97b12e0f8229970d15cb3 Mon Sep 17 00:00:00 2001 -From: Jonathan Wakely -Date: Fri, 7 Jan 2022 15:21:03 +0000 -Subject: [PATCH] libstdc++: Add -nostdinc++ for c++17 sources [PR100017] - -When building a build!=host compiler, the just-built gcc can't be used -to build the target libstdc++ (because it is built for the host triplet, -not the build triplet). The top-level configure.ac sets up the build -flags for libstdc++ (and other "raw_cxx" libs) like this: - -GCC_TARGET_TOOL(c++ for libstdc++, RAW_CXX_FOR_TARGET, CXX, - [gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs], - c++) - -The -nostdinc++ flag is only used for the IN-TREE-TOOL, i.e. when using -the just-built gcc/xgcc compiler. This means that the cross-compiler -used to build libstdc++ will add its own libstdc++ headers to the -include path. That results in the #include in -src/c++17/floating_to_chars.cc and src/c++17/floating_from_chars.cc -doing #include_next and finding the libstdc++ fenv.h wrapper -from the host compiler. Because that has the same include guard as the - in the libstdc++ we're trying to build, we never reach the -underlying from libc. That results in several errors of the -form: - -error: 'fenv_t' has not been declared in '::' - -The most correct fix would be to add -nostdinc++ to the -RAW_CXX_FOR_TARGET variable in configure.ac, or the -RAW_CXX_TARGET_EXPORTS variable in Makefile.tpl. - -Another solution would be to make the libstdc++ wrapper use -_GLIBCXX_INCLUDE_NEXT_C_HEADERS like our and other C header -wrappers. - -For now though, the simplest and safest solution is to just add --nostdinc++ to the CXXFLAGS used for src/c++17/*.cc, which is what this -does. - -libstdc++-v3/ChangeLog: - - PR libstdc++/100017 - * src/c++17/Makefile.am (AM_CXXFLAGS): Add -nostdinc++. - * src/c++17/Makefile.in: Regenerate. ---- - libstdc++-v3/src/c++17/Makefile.am | 2 +- - libstdc++-v3/src/c++17/Makefile.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/libstdc++-v3/src/c++17/Makefile.am -+++ b/libstdc++-v3/src/c++17/Makefile.am -@@ -79,7 +79,7 @@ - # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden - # as the occasion calls for it. - AM_CXXFLAGS = \ -- -std=gnu++17 \ -+ -std=gnu++17 -nostdinc++ \ - $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ - $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \ - $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) \ ---- a/libstdc++-v3/src/c++17/Makefile.in -+++ b/libstdc++-v3/src/c++17/Makefile.in -@@ -455,7 +455,7 @@ - # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden - # as the occasion calls for it. - AM_CXXFLAGS = \ -- -std=gnu++17 \ -+ -std=gnu++17 -nostdinc++ \ - $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ - $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \ - $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) \ diff --git a/packages/gcc/11.2.0/0006-arc-Update-ZOL-pattern.patch b/packages/gcc/11.2.0/0006-arc-Update-ZOL-pattern.patch deleted file mode 100644 index 361c9dbe..00000000 --- a/packages/gcc/11.2.0/0006-arc-Update-ZOL-pattern.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 7efc628f79a1801b292623dfe5aa8c53a61a2121 Mon Sep 17 00:00:00 2001 -From: Claudiu Zissulescu -Date: Tue, 14 Sep 2021 12:25:43 +0300 -Subject: [PATCH] arc: Update ZOL pattern. - -The ZOL pattern is missing modes which may lead to errors during -var_tracking. Add them. - -gcc/ - * config/arc/arc.md (doloop_end): Add missing mode. - (loop_end): Likewise. - -See more details here: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/398 -Will be a part of GCC 12, see: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=9bb20299ba1d1cc3bbd83a07a777fcc5a93cfeb0 - -Signed-off-by: Claudiu Zissulescu ---- - gcc/config/arc/arc.md | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - ---- a/gcc/config/arc/arc.md -+++ b/gcc/config/arc/arc.md -@@ -4990,8 +4990,8 @@ - (const_int 1)) - (label_ref (match_operand 1 "" "")) - (pc))) -- (set (match_dup 0) (plus (match_dup 0) (const_int -1))) -- (unspec [(const_int 0)] UNSPEC_ARC_LP) -+ (set (match_dup 0) (plus:SI (match_dup 0) (const_int -1))) -+ (unspec:SI [(const_int 0)] UNSPEC_ARC_LP) - (clobber (match_dup 2))])] - "" - { -@@ -5020,8 +5020,8 @@ - (const_int 1)) - (label_ref (match_operand 1 "" "")) - (pc))) -- (set (match_dup 0) (plus (match_dup 0) (const_int -1))) -- (unspec [(const_int 0)] UNSPEC_ARC_LP) -+ (set (match_dup 0) (plus:SI (match_dup 0) (const_int -1))) -+ (unspec:SI [(const_int 0)] UNSPEC_ARC_LP) - (clobber (match_scratch:SI 2 "=X,&r"))] - "" - "@ diff --git a/packages/gcc/11.2.0/0007-arc-Update-u-maddhisi4-patterns.patch b/packages/gcc/11.2.0/0007-arc-Update-u-maddhisi4-patterns.patch deleted file mode 100644 index 8b0c34f7..00000000 --- a/packages/gcc/11.2.0/0007-arc-Update-u-maddhisi4-patterns.patch +++ /dev/null @@ -1,115 +0,0 @@ -From b3873d67e4e8a1f16efbfa6ad7d73b9809bb2dd2 Mon Sep 17 00:00:00 2001 -From: Claudiu Zissulescu -Date: Thu, 30 Sep 2021 14:08:39 +0300 -Subject: [PATCH] arc: Update (u)maddhisi4 patterns - -The (u)maddsihi4 patterns are using the ARC's VMAC2H(U) -instruction with null destination, however, VMAC2H(U) doesn't -rewrite the accumulator. This patch solves the destination issue -of VMAC2H by using the accumulator, and is using a -define_insn_and_split to generate the extra move from the -accumulator to the destination register. - -gcc/ - - * config/arc/arc.md (maddhisi4): Use a single move to accumulator. - (umaddhisi4): Likewise. - (machi): Convert it to an define_insn_and_split pattern. - (umachi): Likewise. - -See for more details: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/427 - -Signed-off-by: Claudiu Zissulescu ---- - gcc/config/arc/arc.md | 57 +++++++++++++++++++++++++++++++++++--------------- - 1 file changed, 40 insertions(+), 17 deletions(-) - ---- a/gcc/config/arc/arc.md -+++ b/gcc/config/arc/arc.md -@@ -6051,26 +6051,37 @@ - (define_expand "maddhisi4" - [(match_operand:SI 0 "register_operand" "") - (match_operand:HI 1 "register_operand" "") -- (match_operand:HI 2 "extend_operand" "") -+ (match_operand:HI 2 "register_operand" "") - (match_operand:SI 3 "register_operand" "")] - "TARGET_PLUS_MACD" - "{ - rtx acc_reg = gen_rtx_REG (SImode, ACC_REG_FIRST); - - emit_move_insn (acc_reg, operands[3]); -- emit_insn (gen_machi (operands[1], operands[2])); -- emit_move_insn (operands[0], acc_reg); -+ emit_insn (gen_machi (operands[0], operands[1], operands[2])); - DONE; - }") - --(define_insn "machi" -- [(set (reg:SI ARCV2_ACC) -+(define_insn_and_split "machi" -+ [(set (match_operand:SI 0 "register_operand" "=Ral,r") - (plus:SI -- (mult:SI (sign_extend:SI (match_operand:HI 0 "register_operand" "%r")) -- (sign_extend:SI (match_operand:HI 1 "register_operand" "r"))) -- (reg:SI ARCV2_ACC)))] -+ (mult:SI (sign_extend:SI (match_operand:HI 1 "register_operand" "%r,r")) -+ (sign_extend:SI (match_operand:HI 2 "register_operand" "r,r"))) -+ (reg:SI ARCV2_ACC))) -+ (clobber (reg:DI ARCV2_ACC))] - "TARGET_PLUS_MACD" -- "vmac2h\\t0,%0,%1" -+ "@ -+ vmac2h\\t%0,%1,%2 -+ #" -+ "&& reload_completed && (REGNO (operands[0]) != ACCL_REGNO)" -+ [(parallel -+ [(set (reg:SI ARCV2_ACC) -+ (plus:SI (mult:SI (sign_extend:SI (match_dup 1)) -+ (sign_extend:SI (match_dup 2))) -+ (reg:SI ARCV2_ACC))) -+ (clobber (reg:DI ARCV2_ACC))]) -+ (set (match_dup 0) (reg:SI ARCV2_ACC))] -+ "" - [(set_attr "length" "4") - (set_attr "type" "multi") - (set_attr "predicable" "no") -@@ -6087,19 +6098,31 @@ - rtx acc_reg = gen_rtx_REG (SImode, ACC_REG_FIRST); - - emit_move_insn (acc_reg, operands[3]); -- emit_insn (gen_umachi (operands[1], operands[2])); -- emit_move_insn (operands[0], acc_reg); -+ emit_insn (gen_umachi (operands[0], operands[1], operands[2])); - DONE; - }") - --(define_insn "umachi" -- [(set (reg:SI ARCV2_ACC) -+ -+(define_insn_and_split "umachi" -+ [(set (match_operand:SI 0 "register_operand" "=Ral,r") - (plus:SI -- (mult:SI (zero_extend:SI (match_operand:HI 0 "register_operand" "%r")) -- (zero_extend:SI (match_operand:HI 1 "register_operand" "r"))) -- (reg:SI ARCV2_ACC)))] -+ (mult:SI (zero_extend:SI (match_operand:HI 1 "register_operand" "%r,r")) -+ (zero_extend:SI (match_operand:HI 2 "register_operand" "r,r"))) -+ (reg:SI ARCV2_ACC))) -+ (clobber (reg:DI ARCV2_ACC))] - "TARGET_PLUS_MACD" -- "vmac2hu\\t0,%0,%1" -+ "@ -+ vmac2hu\\t%0,%1,%2 -+ #" -+ "&& reload_completed && (REGNO (operands[0]) != ACCL_REGNO)" -+ [(parallel -+ [(set (reg:SI ARCV2_ACC) -+ (plus:SI (mult:SI (zero_extend:SI (match_dup 1)) -+ (zero_extend:SI (match_dup 2))) -+ (reg:SI ARCV2_ACC))) -+ (clobber (reg:DI ARCV2_ACC))]) -+ (set (match_dup 0) (reg:SI ARCV2_ACC))] -+ "" - [(set_attr "length" "4") - (set_attr "type" "multi") - (set_attr "predicable" "no") diff --git a/packages/gcc/11.2.0/0008-arc-Fix-maddhisi-patterns.patch b/packages/gcc/11.2.0/0008-arc-Fix-maddhisi-patterns.patch deleted file mode 100644 index e4233a36..00000000 --- a/packages/gcc/11.2.0/0008-arc-Fix-maddhisi-patterns.patch +++ /dev/null @@ -1,126 +0,0 @@ -From e73e3c3eaf2c3ea45083dda5dc4b7d29f6a03238 Mon Sep 17 00:00:00 2001 -From: Claudiu Zissulescu -Date: Wed, 6 Oct 2021 09:47:50 +0300 -Subject: [PATCH] arc: Fix maddhisi patterns - -See for more details: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/429 - ---- - gcc/config/arc/arc.md | 43 +++++++--------------------------- - gcc/testsuite/gcc.target/arc/tmac-4.c | 29 ++++++++++++++++++++++ - 2 files changed, 39 insertions(+), 33 deletions(-) - create mode 100644 gcc/testsuite/gcc.target/arc/tmac-4.c - ---- a/gcc/config/arc/arc.md -+++ b/gcc/config/arc/arc.md -@@ -6055,33 +6055,22 @@ - (match_operand:SI 3 "register_operand" "")] - "TARGET_PLUS_MACD" - "{ -- rtx acc_reg = gen_rtx_REG (SImode, ACC_REG_FIRST); -+ rtx acc_reg = gen_rtx_REG (SImode, ACCL_REGNO); - - emit_move_insn (acc_reg, operands[3]); -- emit_insn (gen_machi (operands[0], operands[1], operands[2])); -+ emit_insn (gen_machi (operands[0], operands[1], operands[2], acc_reg)); - DONE; - }") - --(define_insn_and_split "machi" -+(define_insn "machi" - [(set (match_operand:SI 0 "register_operand" "=Ral,r") - (plus:SI - (mult:SI (sign_extend:SI (match_operand:HI 1 "register_operand" "%r,r")) - (sign_extend:SI (match_operand:HI 2 "register_operand" "r,r"))) -- (reg:SI ARCV2_ACC))) -+ (match_operand:SI 3 "accl_operand" ""))) - (clobber (reg:DI ARCV2_ACC))] - "TARGET_PLUS_MACD" -- "@ -- vmac2h\\t%0,%1,%2 -- #" -- "&& reload_completed && (REGNO (operands[0]) != ACCL_REGNO)" -- [(parallel -- [(set (reg:SI ARCV2_ACC) -- (plus:SI (mult:SI (sign_extend:SI (match_dup 1)) -- (sign_extend:SI (match_dup 2))) -- (reg:SI ARCV2_ACC))) -- (clobber (reg:DI ARCV2_ACC))]) -- (set (match_dup 0) (reg:SI ARCV2_ACC))] -- "" -+ "dmach\\t%0,%1,%2" - [(set_attr "length" "4") - (set_attr "type" "multi") - (set_attr "predicable" "no") -@@ -6095,34 +6084,22 @@ - (match_operand:SI 3 "register_operand" "")] - "TARGET_PLUS_MACD" - "{ -- rtx acc_reg = gen_rtx_REG (SImode, ACC_REG_FIRST); -+ rtx acc_reg = gen_rtx_REG (SImode, ACCL_REGNO); - - emit_move_insn (acc_reg, operands[3]); -- emit_insn (gen_umachi (operands[0], operands[1], operands[2])); -+ emit_insn (gen_umachi (operands[0], operands[1], operands[2], acc_reg)); - DONE; - }") - -- --(define_insn_and_split "umachi" -+(define_insn "umachi" - [(set (match_operand:SI 0 "register_operand" "=Ral,r") - (plus:SI - (mult:SI (zero_extend:SI (match_operand:HI 1 "register_operand" "%r,r")) - (zero_extend:SI (match_operand:HI 2 "register_operand" "r,r"))) -- (reg:SI ARCV2_ACC))) -+ (match_operand:SI 3 "accl_operand" ""))) - (clobber (reg:DI ARCV2_ACC))] - "TARGET_PLUS_MACD" -- "@ -- vmac2hu\\t%0,%1,%2 -- #" -- "&& reload_completed && (REGNO (operands[0]) != ACCL_REGNO)" -- [(parallel -- [(set (reg:SI ARCV2_ACC) -- (plus:SI (mult:SI (zero_extend:SI (match_dup 1)) -- (zero_extend:SI (match_dup 2))) -- (reg:SI ARCV2_ACC))) -- (clobber (reg:DI ARCV2_ACC))]) -- (set (match_dup 0) (reg:SI ARCV2_ACC))] -- "" -+ "dmachu\\t%0,%1,%2" - [(set_attr "length" "4") - (set_attr "type" "multi") - (set_attr "predicable" "no") ---- /dev/null -+++ b/gcc/testsuite/gcc.target/arc/tmac-4.c -@@ -0,0 +1,29 @@ -+/* { dg-do compile } */ -+/* { dg-skip-if "" { ! { clmcpu } } } */ -+/* { dg-options "-O3 -mbig-endian -mcpu=hs38" } */ -+ -+struct a {}; -+struct b { -+ int c; -+ int d; -+}; -+ -+struct { -+ struct a e; -+ struct b f[]; -+} g; -+short h; -+ -+extern void bar (int *); -+ -+int foo(void) -+{ -+ struct b *a; -+ for (;;) -+ { -+ a = &g.f[h]; -+ bar(&a->d); -+ } -+} -+ -+/* { dg-final { scan-assembler "dmach" } } */ diff --git a/packages/gcc/11.2.0/0009-Darwin-aarch64-Initial-support-for-the-self-host-dri.patch b/packages/gcc/11.2.0/0009-Darwin-aarch64-Initial-support-for-the-self-host-dri.patch deleted file mode 100644 index ab73edba..00000000 --- a/packages/gcc/11.2.0/0009-Darwin-aarch64-Initial-support-for-the-self-host-dri.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 834c8749ced550af3f17ebae4072fb7dfb90d271 Mon Sep 17 00:00:00 2001 -From: Iain Sandoe -Date: Tue, 18 Aug 2020 22:29:51 +0100 -Subject: [PATCH] Darwin, aarch64 : Initial support for the self-host driver. - -At present, there is no special action needed for aarch64-darwin -this just pulls in generic Darwin code. - -Signed-off-by: Iain Sandoe - -gcc/ChangeLog: - - * config.host: Add support for aarch64-*-darwin. - * config/aarch64/host-aarch64-darwin.c: New file. - * config/aarch64/x-darwin: New file. ---- - gcc/config.host | 7 +++++- - gcc/config/aarch64/host-aarch64-darwin.c | 33 +++++++++++++++++++++++++++++++ - gcc/config/aarch64/x-darwin | 3 ++ - 3 files changed, 42 insertions(+), 1 deletion(-) - create mode 100644 gcc/config/aarch64/host-aarch64-darwin.c - create mode 100644 gcc/config/aarch64/x-darwin - ---- a/gcc/config.host -+++ b/gcc/config.host -@@ -99,7 +99,8 @@ - esac - - case ${host} in -- aarch64*-*-freebsd* | aarch64*-*-linux* | aarch64*-*-fuchsia*) -+ aarch64*-*-freebsd* | aarch64*-*-linux* | aarch64*-*-fuchsia* |\ -+ aarch64*-*-darwin*) - case ${target} in - aarch64*-*-*) - host_extra_gcc_objs="driver-aarch64.o" -@@ -251,6 +252,10 @@ - host_extra_gcc_objs="${host_extra_gcc_objs} driver-mingw32.o" - host_lto_plugin_soname=liblto_plugin.dll - ;; -+ aarch64*-*-darwin*) -+ out_host_hook_obj="${out_host_hook_obj} host-aarch64-darwin.o" -+ host_xmake_file="${host_xmake_file} aarch64/x-darwin" -+ ;; - i[34567]86-*-darwin* | x86_64-*-darwin*) - out_host_hook_obj="${out_host_hook_obj} host-i386-darwin.o" - host_xmake_file="${host_xmake_file} i386/x-darwin" ---- /dev/null -+++ b/gcc/config/aarch64/host-aarch64-darwin.c -@@ -0,0 +1,33 @@ -+/* aarch64/arm64-darwin host-specific hook definitions. -+ -+Copyright The GNU Toolchain Authors. -+ -+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 -+. */ -+ -+#define IN_TARGET_CODE 1 -+ -+#include "config.h" -+#include "system.h" -+#include "coretypes.h" -+#include "hosthooks.h" -+#include "hosthooks-def.h" -+#include "config/host-darwin.h" -+ -+/* Darwin doesn't do anything special for arm64/aarch64 hosts; this file -+ exists just to include the generic config/host-darwin.h. */ -+ -+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER; ---- /dev/null -+++ b/gcc/config/aarch64/x-darwin -@@ -0,0 +1,3 @@ -+host-aarch64-darwin.o : $(srcdir)/config/aarch64/host-aarch64-darwin.c -+ $(COMPILE) $< -+ $(POSTCOMPILE) diff --git a/packages/gcc/11.2.0/0010-libstdc-Check-for-TLS-support-on-mingw-cross-compile.patch b/packages/gcc/11.2.0/0010-libstdc-Check-for-TLS-support-on-mingw-cross-compile.patch deleted file mode 100644 index a4b4ec25..00000000 --- a/packages/gcc/11.2.0/0010-libstdc-Check-for-TLS-support-on-mingw-cross-compile.patch +++ /dev/null @@ -1,251 +0,0 @@ -From cc1e28878a228b6c4a0872e56d97ac88971b7725 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= -Date: Tue, 14 Sep 2021 16:41:37 +0100 -Subject: [PATCH] libstdc++: Check for TLS support on mingw cross-compilers - -Native mingw builds enable TLS, but crosses don't because we don't use -GCC_CHECK_TLS in the cross-compiler config. - -libstdc++-v3/ChangeLog: - - * crossconfig.m4: Check for TLS support on mingw. - * configure: Regenerate. ---- - libstdc++-v3/configure | 208 ++++++++++++++++++++++++++++++++++++ - libstdc++-v3/crossconfig.m4 | 1 + - 2 files changed, 209 insertions(+) - -diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure -index 13d52eb0c0e..c1aea827070 100755 ---- a/libstdc++-v3/configure -+++ b/libstdc++-v3/configure -@@ -60242,6 +60242,214 @@ _ACEOF - fi - done - -+ -+ -+ # Check whether --enable-tls was given. -+if test "${enable_tls+set}" = set; then : -+ enableval=$enable_tls; -+ case "$enableval" in -+ yes|no) ;; -+ *) as_fn_error $? "Argument to enable/disable tls must be yes or no" "$LINENO" 5 ;; -+ esac -+ -+else -+ enable_tls=yes -+fi -+ -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports thread-local storage" >&5 -+$as_echo_n "checking whether the target supports thread-local storage... " >&6; } -+if ${gcc_cv_have_tls+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ -+ if test "$cross_compiling" = yes; then : -+ if test x$gcc_no_link = xyes; then -+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 -+fi -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__thread int a; int b; int main() { return a = b; } -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ chktls_save_LDFLAGS="$LDFLAGS" -+ case $host in -+ *-*-linux* | -*-uclinuxfdpic*) -+ LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS" -+ ;; -+ esac -+ chktls_save_CFLAGS="$CFLAGS" -+ CFLAGS="-fPIC $CFLAGS" -+ if test x$gcc_no_link = xyes; then -+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 -+fi -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+int f() { return 0; } -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ if test x$gcc_no_link = xyes; then -+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 -+fi -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__thread int a; int b; int f() { return a = b; } -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ gcc_cv_have_tls=yes -+else -+ gcc_cv_have_tls=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+else -+ gcc_cv_have_tls=yes -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+ CFLAGS="$chktls_save_CFLAGS" -+ LDFLAGS="$chktls_save_LDFLAGS" -+else -+ gcc_cv_have_tls=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+ -+ -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__thread int a; int b; int main() { return a = b; } -+_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : -+ chktls_save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="-static $LDFLAGS" -+ if test x$gcc_no_link = xyes; then -+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 -+fi -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+int main() { return 0; } -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ if test "$cross_compiling" = yes; then : -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+as_fn_error $? "cannot run test program while cross compiling -+See \`config.log' for more details" "$LINENO" 5; } -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__thread int a; int b; int main() { return a = b; } -+_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : -+ gcc_cv_have_tls=yes -+else -+ gcc_cv_have_tls=no -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi -+ -+else -+ gcc_cv_have_tls=yes -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+ LDFLAGS="$chktls_save_LDFLAGS" -+ if test $gcc_cv_have_tls = yes; then -+ chktls_save_CFLAGS="$CFLAGS" -+ thread_CFLAGS=failed -+ for flag in '' '-pthread' '-lpthread'; do -+ CFLAGS="$flag $chktls_save_CFLAGS" -+ if test x$gcc_no_link = xyes; then -+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 -+fi -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include -+ void *g(void *d) { return NULL; } -+int -+main () -+{ -+pthread_t t; pthread_create(&t,NULL,g,NULL); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ thread_CFLAGS="$flag" -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+ if test "X$thread_CFLAGS" != Xfailed; then -+ break -+ fi -+ done -+ CFLAGS="$chktls_save_CFLAGS" -+ if test "X$thread_CFLAGS" != Xfailed; then -+ CFLAGS="$thread_CFLAGS $chktls_save_CFLAGS" -+ if test "$cross_compiling" = yes; then : -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+as_fn_error $? "cannot run test program while cross compiling -+See \`config.log' for more details" "$LINENO" 5; } -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include -+ __thread int a; -+ static int *volatile a_in_other_thread; -+ static void * -+ thread_func (void *arg) -+ { -+ a_in_other_thread = &a; -+ return (void *)0; -+ } -+int -+main () -+{ -+pthread_t thread; -+ void *thread_retval; -+ int *volatile a_in_main_thread; -+ a_in_main_thread = &a; -+ if (pthread_create (&thread, (pthread_attr_t *)0, -+ thread_func, (void *)0)) -+ return 0; -+ if (pthread_join (thread, &thread_retval)) -+ return 0; -+ return (a_in_other_thread == a_in_main_thread); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : -+ gcc_cv_have_tls=yes -+else -+ gcc_cv_have_tls=no -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi -+ -+ CFLAGS="$chktls_save_CFLAGS" -+ fi -+ fi -+else -+ gcc_cv_have_tls=no -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_have_tls" >&5 -+$as_echo "$gcc_cv_have_tls" >&6; } -+ if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then -+ -+$as_echo "#define HAVE_TLS 1" >>confdefs.h -+ -+ fi - ;; - *-netbsd* | *-openbsd*) - SECTION_FLAGS='-ffunction-sections -fdata-sections' -diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4 -index ff44d5ae019..ae5283b7ad3 100644 ---- a/libstdc++-v3/crossconfig.m4 -+++ b/libstdc++-v3/crossconfig.m4 -@@ -204,6 +204,7 @@ case "${host}" in - GLIBCXX_CHECK_STDLIB_SUPPORT - AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc) - AC_CHECK_FUNCS(_wfopen) -+ GCC_CHECK_TLS - ;; - *-netbsd* | *-openbsd*) - SECTION_FLAGS='-ffunction-sections -fdata-sections' --- -2.33.0.windows.2 - diff --git a/packages/gcc/11.2.0/0011-powerpc-Fix-asm-machine-directive-for-some-CPUs.patch b/packages/gcc/11.2.0/0011-powerpc-Fix-asm-machine-directive-for-some-CPUs.patch deleted file mode 100644 index 424cb1d1..00000000 --- a/packages/gcc/11.2.0/0011-powerpc-Fix-asm-machine-directive-for-some-CPUs.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 3cb53c10831be59d967d9dce8e7980fee4703500 Mon Sep 17 00:00:00 2001 -From: Sebastian Huber -Date: Tue, 18 Jan 2022 12:44:53 +0100 -Subject: [PATCH] powerpc: Fix asm machine directive for some CPUs - -For some CPUs, the assembler machine directive cannot be determined by ISA -flags. - -gcc/ - - PR target/104090 - * config/rs6000/rs6000.c (rs6000_machine_from_flags): Use also - rs6000_cpu. ---- - gcc/config/rs6000/rs6000.c | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - -diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c -index c4f5c53932c7..9b1c3a8b5eae 100644 ---- a/gcc/config/rs6000/rs6000.c -+++ b/gcc/config/rs6000/rs6000.c -@@ -5766,6 +5766,34 @@ const char *rs6000_machine; - const char * - rs6000_machine_from_flags (void) - { -+ /* For some CPUs, the machine cannot be determined by ISA flags. We have to -+ check them first. */ -+ switch (rs6000_cpu) -+ { -+ case PROCESSOR_PPC8540: -+ case PROCESSOR_PPC8548: -+ return "e500"; -+ -+ case PROCESSOR_PPCE300C2: -+ case PROCESSOR_PPCE300C3: -+ return "e300"; -+ -+ case PROCESSOR_PPCE500MC: -+ return "e500mc"; -+ -+ case PROCESSOR_PPCE500MC64: -+ return "e500mc64"; -+ -+ case PROCESSOR_PPCE5500: -+ return "e5500"; -+ -+ case PROCESSOR_PPCE6500: -+ return "e6500"; -+ -+ default: -+ break; -+ } -+ - HOST_WIDE_INT flags = rs6000_isa_flags; - - /* Disable the flags that should never influence the .machine selection. */ --- -2.35.1 - diff --git a/packages/gcc/11.2.0/0012-c-designator-and-anon-struct-PR101767.patch b/packages/gcc/11.2.0/0012-c-designator-and-anon-struct-PR101767.patch deleted file mode 100644 index 65f3237e..00000000 --- a/packages/gcc/11.2.0/0012-c-designator-and-anon-struct-PR101767.patch +++ /dev/null @@ -1,71 +0,0 @@ -From b94c95fc1199bfa2c7ab577921b07ef545976cac Mon Sep 17 00:00:00 2001 -From: Jason Merrill -Date: Fri, 18 Mar 2022 14:36:19 -0400 -Subject: c++: designator and anon struct [PR101767] - -We found .x in the anonymous struct, but then didn't find .y there; we -should decide that means we're done with the struct rather than that the -code is wrong. - - PR c++/101767 - -gcc/cp/ChangeLog: - - * decl.c (reshape_init_class): Back out of anon struct - if a designator doesn't match. - -gcc/testsuite/ChangeLog: - - * g++.dg/ext/anon-struct10.C: New test. ---- - gcc/cp/decl.c | 5 +++++ - gcc/testsuite/g++.dg/ext/anon-struct10.C | 21 +++++++++++++++++++++ - 2 files changed, 26 insertions(+) - create mode 100644 gcc/testsuite/g++.dg/ext/anon-struct10.C - -diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c -index 41094c891fc..6d3e764fb14 100644 ---- a/gcc/cp/decl.c -+++ b/gcc/cp/decl.c -@@ -6437,6 +6437,11 @@ reshape_init_class (tree type, reshape_iter *d, bool first_initializer_p, - return error_mark_node; - } - -+ if (!field && ANON_AGGR_TYPE_P (type)) -+ /* Apparently the designator isn't for a member of this anonymous -+ struct, so head back to the enclosing class. */ -+ break; -+ - if (!field || TREE_CODE (field) != FIELD_DECL) - { - if (complain & tf_error) -diff --git a/gcc/testsuite/g++.dg/ext/anon-struct10.C b/gcc/testsuite/g++.dg/ext/anon-struct10.C -new file mode 100644 -index 00000000000..9b01bf3fada ---- /dev/null -+++ b/gcc/testsuite/g++.dg/ext/anon-struct10.C -@@ -0,0 +1,21 @@ -+// PR c++/101767 -+// { dg-do compile { target c++11 } } -+// { dg-additional-options "-Wno-pedantic" } -+ -+typedef struct { -+ struct { -+ int x; -+ }; -+ union { -+ int y; -+ float z; -+ }; -+} S; -+ -+void foo(void) -+{ -+ [[maybe_unused]] S a = { -+ .x = 1, -+ .y = 0 -+ }; -+} --- -2.31.1 - diff --git a/packages/gcc/11.2.0/0013-c-designated-init-and-aggregate-members-PR103337.patch b/packages/gcc/11.2.0/0013-c-designated-init-and-aggregate-members-PR103337.patch deleted file mode 100644 index 4133c9c7..00000000 --- a/packages/gcc/11.2.0/0013-c-designated-init-and-aggregate-members-PR103337.patch +++ /dev/null @@ -1,240 +0,0 @@ -From 2b2f575e6f27acc0c7ba6a3affc760bf2b96a84b Mon Sep 17 00:00:00 2001 -From: Jason Merrill -Date: Mon, 21 Mar 2022 09:57:28 -0400 -Subject: c++: designated init and aggregate members [PR103337] - -Our C++20 designated initializer handling was broken with members of class -type; we would find the relevant member and then try to find a member of -the member with the same name. Or we would sometimes ignore the designator -entirely. The former problem is fixed by the change to reshape_init_class, -the latter by the change to reshape_init_r. - - PR c++/103337 - PR c++/102740 - PR c++/103299 - PR c++/102538 - -gcc/cp/ChangeLog: - - * decl.c (reshape_init_class): Avoid looking for designator - after we found it. - (reshape_init_r): Keep looking for designator. - -gcc/testsuite/ChangeLog: - - * g++.dg/ext/flexary3.C: Remove one error. - * g++.dg/parse/pr43765.C: Likewise. - * g++.dg/cpp2a/desig22.C: New test. - * g++.dg/cpp2a/desig23.C: New test. - * g++.dg/cpp2a/desig24.C: New test. - * g++.dg/cpp2a/desig25.C: New test. ---- - gcc/cp/decl.c | 47 +++++++++++++++++++++++++--- - gcc/testsuite/g++.dg/cpp2a/desig22.C | 11 +++++++ - gcc/testsuite/g++.dg/cpp2a/desig23.C | 20 ++++++++++++ - gcc/testsuite/g++.dg/cpp2a/desig24.C | 11 +++++++ - gcc/testsuite/g++.dg/cpp2a/desig25.C | 13 ++++++++ - gcc/testsuite/g++.dg/ext/flexary3.C | 2 +- - gcc/testsuite/g++.dg/parse/pr43765.C | 6 ++-- - 7 files changed, 101 insertions(+), 9 deletions(-) - create mode 100644 gcc/testsuite/g++.dg/cpp2a/desig22.C - create mode 100644 gcc/testsuite/g++.dg/cpp2a/desig23.C - create mode 100644 gcc/testsuite/g++.dg/cpp2a/desig24.C - create mode 100644 gcc/testsuite/g++.dg/cpp2a/desig25.C - -diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c -index 6d3e764fb14..1ba648be1cc 100644 ---- a/gcc/cp/decl.c -+++ b/gcc/cp/decl.c -@@ -6409,8 +6409,9 @@ reshape_init_class (tree type, reshape_iter *d, bool first_initializer_p, - { - tree field_init; - constructor_elt *old_cur = d->cur; -+ bool direct_desig = false; - -- /* Handle designated initializers, as an extension. */ -+ /* Handle C++20 designated initializers. */ - if (d->cur->index) - { - if (d->cur->index == error_mark_node) -@@ -6428,7 +6429,10 @@ reshape_init_class (tree type, reshape_iter *d, bool first_initializer_p, - } - } - else if (TREE_CODE (d->cur->index) == IDENTIFIER_NODE) -- field = get_class_binding (type, d->cur->index); -+ { -+ field = get_class_binding (type, d->cur->index); -+ direct_desig = true; -+ } - else - { - if (complain & tf_error) -@@ -6474,6 +6478,7 @@ reshape_init_class (tree type, reshape_iter *d, bool first_initializer_p, - break; - gcc_assert (aafield); - field = aafield; -+ direct_desig = false; - } - } - -@@ -6488,9 +6493,32 @@ reshape_init_class (tree type, reshape_iter *d, bool first_initializer_p, - assumed to correspond to no elements of the initializer list. */ - goto continue_; - -- field_init = reshape_init_r (TREE_TYPE (field), d, -- /*first_initializer_p=*/NULL_TREE, -- complain); -+ if (direct_desig) -+ { -+ /* The designated field F is initialized from this one element: -+ Temporarily clear the designator so a recursive reshape_init_class -+ doesn't try to find it again in F, and adjust d->end so we don't -+ try to use the next initializer to initialize another member of F. -+ -+ Note that we don't want these changes if we found the designator -+ inside an anon aggr above; we leave them alone to implement: -+ -+ "If the element is an anonymous union member and the initializer -+ list is a brace-enclosed designated- initializer-list, the element -+ is initialized by the designated-initializer-list { D }, where D -+ is the designated- initializer-clause naming a member of the -+ anonymous union member." */ -+ auto end_ = make_temp_override (d->end, d->cur + 1); -+ auto idx_ = make_temp_override (d->cur->index, NULL_TREE); -+ field_init = reshape_init_r (TREE_TYPE (field), d, -+ /*first_initializer_p=*/NULL_TREE, -+ complain); -+ } -+ else -+ field_init = reshape_init_r (TREE_TYPE (field), d, -+ /*first_initializer_p=*/NULL_TREE, -+ complain); -+ - if (field_init == error_mark_node) - return error_mark_node; - -@@ -6742,6 +6770,15 @@ reshape_init_r (tree type, reshape_iter *d, tree first_initializer_p, - to handle initialization of arrays and similar. */ - else if (COMPOUND_LITERAL_P (stripped_init)) - gcc_assert (!BRACE_ENCLOSED_INITIALIZER_P (stripped_init)); -+ /* If we have an unresolved designator, we need to find the member it -+ designates within TYPE, so proceed to the routines below. For -+ FIELD_DECL or INTEGER_CST designators, we're already initializing -+ the designated element. */ -+ else if (d->cur->index -+ && TREE_CODE (d->cur->index) == IDENTIFIER_NODE) -+ /* Brace elision with designators is only permitted for anonymous -+ aggregates. */ -+ gcc_checking_assert (ANON_AGGR_TYPE_P (type)); - /* A CONSTRUCTOR of the target's type is a previously - digested initializer. */ - else if (same_type_ignoring_top_level_qualifiers_p (type, init_type)) -diff --git a/gcc/testsuite/g++.dg/cpp2a/desig22.C b/gcc/testsuite/g++.dg/cpp2a/desig22.C -new file mode 100644 -index 00000000000..ba083f8e3d5 ---- /dev/null -+++ b/gcc/testsuite/g++.dg/cpp2a/desig22.C -@@ -0,0 +1,11 @@ -+// PR c++/103337 -+// { dg-do compile { target c++20 } } -+ -+struct op_t { -+ struct put_t { -+ int x; -+ } put; -+}; -+ -+op_t x{0}; // OK -+op_t y{.put=0}; // bogus error: 'op_t::put_t' has no non-static data member named 'put' -diff --git a/gcc/testsuite/g++.dg/cpp2a/desig23.C b/gcc/testsuite/g++.dg/cpp2a/desig23.C -new file mode 100644 -index 00000000000..4354e644f6a ---- /dev/null -+++ b/gcc/testsuite/g++.dg/cpp2a/desig23.C -@@ -0,0 +1,20 @@ -+// PR c++/102740 -+// { dg-do compile { target c++20 } } -+// { dg-additional-options -Wmissing-braces } -+ -+typedef struct { -+ union { -+ struct { -+ const void* content; -+ } put; -+ }; -+} op_t; -+ -+op_t f(const char* alias) { -+ return op_t{ -+ .put = -+ { -+ .content = alias, -+ }, -+ }; // { dg-warning "missing braces" } -+} -diff --git a/gcc/testsuite/g++.dg/cpp2a/desig24.C b/gcc/testsuite/g++.dg/cpp2a/desig24.C -new file mode 100644 -index 00000000000..219cc9c3b8e ---- /dev/null -+++ b/gcc/testsuite/g++.dg/cpp2a/desig24.C -@@ -0,0 +1,11 @@ -+// PR c++/103299 -+// { dg-do compile { target c++20 } } -+ -+struct foo { -+ union { -+ int fp1{}; -+ char fp2; -+ }; -+}; -+ -+static_assert(foo{.fp2={}}.fp2 == 0); -diff --git a/gcc/testsuite/g++.dg/cpp2a/desig25.C b/gcc/testsuite/g++.dg/cpp2a/desig25.C -new file mode 100644 -index 00000000000..9da958c29e9 ---- /dev/null -+++ b/gcc/testsuite/g++.dg/cpp2a/desig25.C -@@ -0,0 +1,13 @@ -+// PR c++/102538 -+// { dg-do run { target c++20 } } -+ -+struct X { union { char r8[8]; int r32[2]; }; }; -+struct Y { X v[1]; }; -+Y x = { { { .r32 = { 5, 6 } } } }; -+ -+int -+main () -+{ -+ if (x.v[0].r32[0] != 5 || x.v[0].r32[1] != 6) -+ __builtin_abort (); -+} -diff --git a/gcc/testsuite/g++.dg/ext/flexary3.C b/gcc/testsuite/g++.dg/ext/flexary3.C -index 34b17254f8c..8344b42dd16 100644 ---- a/gcc/testsuite/g++.dg/ext/flexary3.C -+++ b/gcc/testsuite/g++.dg/ext/flexary3.C -@@ -16,7 +16,7 @@ struct s { - - int main() - { -- struct s s = { .c = 0 }; // { dg-error "initializer" } -+ struct s s = { .c = 0 }; - // { dg-error "non-static initialization of a flexible array member" "" { target *-*-* } .-1 } - return 0; - } -diff --git a/gcc/testsuite/g++.dg/parse/pr43765.C b/gcc/testsuite/g++.dg/parse/pr43765.C -index 5e602204007..aa099a4d20b 100644 ---- a/gcc/testsuite/g++.dg/parse/pr43765.C -+++ b/gcc/testsuite/g++.dg/parse/pr43765.C -@@ -12,6 +12,6 @@ SomeType vals[] = - { - { 0, values : temp, }, // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++2a } } - 0 -- }; // { dg-error "GNU-style designated initializer for an array|cannot convert" } --// (note the error above is on the wrong line) -- // { dg-error "initialization of flexible array member in a nested context" "" { target *-*-* } .-2 } -+ }; -+// (note the error below is on the wrong line) -+// { dg-error "initialization of flexible array member in a nested context" "" { target *-*-* } .-2 } --- -2.31.1 - diff --git a/packages/gcc/11.2.0/chksum b/packages/gcc/11.2.0/chksum deleted file mode 100644 index 36a02f83..00000000 --- a/packages/gcc/11.2.0/chksum +++ /dev/null @@ -1,8 +0,0 @@ -md5 gcc-11.2.0.tar.xz 31c86f2ced76acac66992eeedce2fce2 -sha1 gcc-11.2.0.tar.xz f902ccacecf8949978d6261e9f1d034cff73ffdb -sha256 gcc-11.2.0.tar.xz d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b -sha512 gcc-11.2.0.tar.xz d53a0a966230895c54f01aea38696f818817b505f1e2bfa65e508753fcd01b2aedb4a61434f41f3a2ddbbd9f41384b96153c684ded3f0fa97c82758d9de5c7cf -md5 gcc-11.2.0.tar.gz dc6886bd44bb49e2d3d662aed9729278 -sha1 gcc-11.2.0.tar.gz 4d631f343fc3bca2097dbb115f3cb42309a09e22 -sha256 gcc-11.2.0.tar.gz f0837f1bf8244a5cc23bd96ff6366712a791cfae01df8e25b137698aca26efc1 -sha512 gcc-11.2.0.tar.gz 78318318bc2f19dfa9e0e23ffd132758b11785422761eeb7f5c2988cdd0560860d4580142496faa211ba80414bae9b7f3bc55ea968bdd5c1f713d4c5266e2fa3 diff --git a/packages/gcc/11.2.0/version.desc b/packages/gcc/11.2.0/version.desc deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/gcc/11.3.0/0000-libtool-leave-framework-alone.patch b/packages/gcc/11.3.0/0000-libtool-leave-framework-alone.patch new file mode 100644 index 00000000..1a86e415 --- /dev/null +++ b/packages/gcc/11.3.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 @@ + 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 diff --git a/packages/gcc/11.3.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc/11.3.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch new file mode 100644 index 00000000..5f9a07a2 --- /dev/null +++ b/packages/gcc/11.3.0/0001-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 @@ + #include + #include + #include ++#include + #include + #include + #include "marshall.hh" diff --git a/packages/gcc/11.3.0/0002-arm-softfloat-libgcc.patch b/packages/gcc/11.3.0/0002-arm-softfloat-libgcc.patch new file mode 100644 index 00000000..d9800365 --- /dev/null +++ b/packages/gcc/11.3.0/0002-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.3.0/0003-libgcc-disable-split-stack-nothreads.patch b/packages/gcc/11.3.0/0003-libgcc-disable-split-stack-nothreads.patch new file mode 100644 index 00000000..df91a9ff --- /dev/null +++ b/packages/gcc/11.3.0/0003-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.3.0/0004-Remove-use-of-include_next-from-c-headers.patch b/packages/gcc/11.3.0/0004-Remove-use-of-include_next-from-c-headers.patch new file mode 100644 index 00000000..920e64da --- /dev/null +++ b/packages/gcc/11.3.0/0004-Remove-use-of-include_next-from-c-headers.patch @@ -0,0 +1,262 @@ +From 9db1164d68ee1da7434af48db4f828d7df51b055 Mon Sep 17 00:00:00 2001 +From: Keith Packard +Date: Sun, 24 Jan 2021 14:20:33 -0800 +Subject: [PATCH] Remove use of include_next from c++ headers + +Using include_next bypasses the default header search path and lets +files later in the include path take priority over earlier files. + +This makes replacing libc impossible as the default libc headers will +occur after the libstdc++ headers, and so be picked up in place of +headers inserted at the begining of the search path or appended to the +end of the search path. + +Using include_next is a hack to work-around broken combinations of +libraries, and is not necessary in a well constructed toolchain. + +Signed-off-by: Keith Packard +--- + libstdc++-v3/include/bits/std_abs.h | 4 ++-- + libstdc++-v3/include/c/cassert | 2 +- + libstdc++-v3/include/c/cctype | 2 +- + libstdc++-v3/include/c/cerrno | 2 +- + libstdc++-v3/include/c/cfloat | 2 +- + libstdc++-v3/include/c/climits | 2 +- + libstdc++-v3/include/c/clocale | 2 +- + libstdc++-v3/include/c/cmath | 2 +- + libstdc++-v3/include/c/csetjmp | 2 +- + libstdc++-v3/include/c/csignal | 2 +- + libstdc++-v3/include/c/cstdarg | 2 +- + libstdc++-v3/include/c/cstddef | 2 +- + libstdc++-v3/include/c/cstdio | 2 +- + libstdc++-v3/include/c/cstdlib | 2 +- + libstdc++-v3/include/c/cstring | 2 +- + libstdc++-v3/include/c/ctime | 2 +- + libstdc++-v3/include/c/cuchar | 2 +- + libstdc++-v3/include/c/cwchar | 2 +- + libstdc++-v3/include/c/cwctype | 2 +- + libstdc++-v3/include/c_global/cmath | 2 +- + libstdc++-v3/include/c_global/cstdlib | 2 +- + 21 files changed, 22 insertions(+), 22 deletions(-) + +--- a/libstdc++-v3/include/bits/std_abs.h ++++ b/libstdc++-v3/include/bits/std_abs.h +@@ -35,9 +35,9 @@ + #include + + #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS +-#include_next ++#include + #ifdef __CORRECT_ISO_CPP_MATH_H_PROTO +-# include_next ++# include + #endif + #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS + +--- a/libstdc++-v3/include/c/cassert ++++ b/libstdc++-v3/include/c/cassert +@@ -31,4 +31,4 @@ + #pragma GCC system_header + + #include +-#include_next ++#include +--- a/libstdc++-v3/include/c/cctype ++++ b/libstdc++-v3/include/c/cctype +@@ -31,6 +31,6 @@ + + #pragma GCC system_header + +-#include_next ++#include + + #endif +--- a/libstdc++-v3/include/c/cerrno ++++ b/libstdc++-v3/include/c/cerrno +@@ -41,7 +41,7 @@ + #pragma GCC system_header + + #include +-#include_next ++#include + + // Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 + #ifndef errno +--- a/libstdc++-v3/include/c/cfloat ++++ b/libstdc++-v3/include/c/cfloat +@@ -32,6 +32,6 @@ + #pragma GCC system_header + + #include +-#include_next ++#include + + #endif +--- a/libstdc++-v3/include/c/climits ++++ b/libstdc++-v3/include/c/climits +@@ -32,6 +32,6 @@ + #pragma GCC system_header + + #include +-#include_next ++#include + + #endif +--- a/libstdc++-v3/include/c/clocale ++++ b/libstdc++-v3/include/c/clocale +@@ -31,6 +31,6 @@ + + #pragma GCC system_header + +-#include_next ++#include + + #endif +--- a/libstdc++-v3/include/c/cmath ++++ b/libstdc++-v3/include/c/cmath +@@ -33,7 +33,7 @@ + + #include + +-#include_next ++#include + + // Get rid of those macros defined in in lieu of real functions. + #undef abs +--- a/libstdc++-v3/include/c/csetjmp ++++ b/libstdc++-v3/include/c/csetjmp +@@ -31,7 +31,7 @@ + + #pragma GCC system_header + +-#include_next ++#include + + // Get rid of those macros defined in in lieu of real functions. + #undef longjmp +--- a/libstdc++-v3/include/c/csignal ++++ b/libstdc++-v3/include/c/csignal +@@ -31,6 +31,6 @@ + + #pragma GCC system_header + +-#include_next ++#include + + #endif +--- a/libstdc++-v3/include/c/cstdarg ++++ b/libstdc++-v3/include/c/cstdarg +@@ -32,6 +32,6 @@ + #pragma GCC system_header + + #undef __need___va_list +-#include_next ++#include + + #endif +--- a/libstdc++-v3/include/c/cstddef ++++ b/libstdc++-v3/include/c/cstddef +@@ -35,6 +35,6 @@ + #define __need_ptrdiff_t + #define __need_NULL + #define __need_offsetof +-#include_next ++#include + + #endif +--- a/libstdc++-v3/include/c/cstdio ++++ b/libstdc++-v3/include/c/cstdio +@@ -31,7 +31,7 @@ + + #pragma GCC system_header + +-#include_next ++#include + + // Get rid of those macros defined in in lieu of real functions. + #undef clearerr +--- a/libstdc++-v3/include/c/cstdlib ++++ b/libstdc++-v3/include/c/cstdlib +@@ -31,6 +31,6 @@ + + #pragma GCC system_header + +-#include_next ++#include + + #endif +--- a/libstdc++-v3/include/c/cstring ++++ b/libstdc++-v3/include/c/cstring +@@ -31,6 +31,6 @@ + + #pragma GCC system_header + +-#include_next ++#include + + #endif +--- a/libstdc++-v3/include/c/ctime ++++ b/libstdc++-v3/include/c/ctime +@@ -31,6 +31,6 @@ + + #pragma GCC system_header + +-#include_next ++#include + + #endif +--- a/libstdc++-v3/include/c/cuchar ++++ b/libstdc++-v3/include/c/cuchar +@@ -39,7 +39,7 @@ + #include + + #if _GLIBCXX_USE_C11_UCHAR_CXX11 +-# include_next ++# include + #endif + + #endif // C++11 +--- a/libstdc++-v3/include/c/cwchar ++++ b/libstdc++-v3/include/c/cwchar +@@ -36,7 +36,7 @@ + #include + + #if _GLIBCXX_HAVE_WCHAR_H +-#include_next ++#include + #endif + + // Need to do a bit of trickery here with mbstate_t as char_traits +--- a/libstdc++-v3/include/c/cwctype ++++ b/libstdc++-v3/include/c/cwctype +@@ -34,7 +34,7 @@ + #include + + #if _GLIBCXX_HAVE_WCTYPE_H +-#include_next ++#include + #endif + + #endif +--- a/libstdc++-v3/include/c_global/cmath ++++ b/libstdc++-v3/include/c_global/cmath +@@ -42,7 +42,7 @@ + #include + #include + #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS +-#include_next ++#include + #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS + #include + +--- a/libstdc++-v3/include/c_global/cstdlib ++++ b/libstdc++-v3/include/c_global/cstdlib +@@ -72,7 +72,7 @@ + // Need to ensure this finds the C library's not a libstdc++ + // wrapper that might already be installed later in the include search path. + #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS +-#include_next ++#include + #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS + #include + diff --git a/packages/gcc/11.3.0/0005-arc-Update-ZOL-pattern.patch b/packages/gcc/11.3.0/0005-arc-Update-ZOL-pattern.patch new file mode 100644 index 00000000..361c9dbe --- /dev/null +++ b/packages/gcc/11.3.0/0005-arc-Update-ZOL-pattern.patch @@ -0,0 +1,44 @@ +From 7efc628f79a1801b292623dfe5aa8c53a61a2121 Mon Sep 17 00:00:00 2001 +From: Claudiu Zissulescu +Date: Tue, 14 Sep 2021 12:25:43 +0300 +Subject: [PATCH] arc: Update ZOL pattern. + +The ZOL pattern is missing modes which may lead to errors during +var_tracking. Add them. + +gcc/ + * config/arc/arc.md (doloop_end): Add missing mode. + (loop_end): Likewise. + +See more details here: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/398 +Will be a part of GCC 12, see: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=9bb20299ba1d1cc3bbd83a07a777fcc5a93cfeb0 + +Signed-off-by: Claudiu Zissulescu +--- + gcc/config/arc/arc.md | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/gcc/config/arc/arc.md ++++ b/gcc/config/arc/arc.md +@@ -4990,8 +4990,8 @@ + (const_int 1)) + (label_ref (match_operand 1 "" "")) + (pc))) +- (set (match_dup 0) (plus (match_dup 0) (const_int -1))) +- (unspec [(const_int 0)] UNSPEC_ARC_LP) ++ (set (match_dup 0) (plus:SI (match_dup 0) (const_int -1))) ++ (unspec:SI [(const_int 0)] UNSPEC_ARC_LP) + (clobber (match_dup 2))])] + "" + { +@@ -5020,8 +5020,8 @@ + (const_int 1)) + (label_ref (match_operand 1 "" "")) + (pc))) +- (set (match_dup 0) (plus (match_dup 0) (const_int -1))) +- (unspec [(const_int 0)] UNSPEC_ARC_LP) ++ (set (match_dup 0) (plus:SI (match_dup 0) (const_int -1))) ++ (unspec:SI [(const_int 0)] UNSPEC_ARC_LP) + (clobber (match_scratch:SI 2 "=X,&r"))] + "" + "@ diff --git a/packages/gcc/11.3.0/0006-arc-Update-u-maddhisi4-patterns.patch b/packages/gcc/11.3.0/0006-arc-Update-u-maddhisi4-patterns.patch new file mode 100644 index 00000000..8b0c34f7 --- /dev/null +++ b/packages/gcc/11.3.0/0006-arc-Update-u-maddhisi4-patterns.patch @@ -0,0 +1,115 @@ +From b3873d67e4e8a1f16efbfa6ad7d73b9809bb2dd2 Mon Sep 17 00:00:00 2001 +From: Claudiu Zissulescu +Date: Thu, 30 Sep 2021 14:08:39 +0300 +Subject: [PATCH] arc: Update (u)maddhisi4 patterns + +The (u)maddsihi4 patterns are using the ARC's VMAC2H(U) +instruction with null destination, however, VMAC2H(U) doesn't +rewrite the accumulator. This patch solves the destination issue +of VMAC2H by using the accumulator, and is using a +define_insn_and_split to generate the extra move from the +accumulator to the destination register. + +gcc/ + + * config/arc/arc.md (maddhisi4): Use a single move to accumulator. + (umaddhisi4): Likewise. + (machi): Convert it to an define_insn_and_split pattern. + (umachi): Likewise. + +See for more details: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/427 + +Signed-off-by: Claudiu Zissulescu +--- + gcc/config/arc/arc.md | 57 +++++++++++++++++++++++++++++++++++--------------- + 1 file changed, 40 insertions(+), 17 deletions(-) + +--- a/gcc/config/arc/arc.md ++++ b/gcc/config/arc/arc.md +@@ -6051,26 +6051,37 @@ + (define_expand "maddhisi4" + [(match_operand:SI 0 "register_operand" "") + (match_operand:HI 1 "register_operand" "") +- (match_operand:HI 2 "extend_operand" "") ++ (match_operand:HI 2 "register_operand" "") + (match_operand:SI 3 "register_operand" "")] + "TARGET_PLUS_MACD" + "{ + rtx acc_reg = gen_rtx_REG (SImode, ACC_REG_FIRST); + + emit_move_insn (acc_reg, operands[3]); +- emit_insn (gen_machi (operands[1], operands[2])); +- emit_move_insn (operands[0], acc_reg); ++ emit_insn (gen_machi (operands[0], operands[1], operands[2])); + DONE; + }") + +-(define_insn "machi" +- [(set (reg:SI ARCV2_ACC) ++(define_insn_and_split "machi" ++ [(set (match_operand:SI 0 "register_operand" "=Ral,r") + (plus:SI +- (mult:SI (sign_extend:SI (match_operand:HI 0 "register_operand" "%r")) +- (sign_extend:SI (match_operand:HI 1 "register_operand" "r"))) +- (reg:SI ARCV2_ACC)))] ++ (mult:SI (sign_extend:SI (match_operand:HI 1 "register_operand" "%r,r")) ++ (sign_extend:SI (match_operand:HI 2 "register_operand" "r,r"))) ++ (reg:SI ARCV2_ACC))) ++ (clobber (reg:DI ARCV2_ACC))] + "TARGET_PLUS_MACD" +- "vmac2h\\t0,%0,%1" ++ "@ ++ vmac2h\\t%0,%1,%2 ++ #" ++ "&& reload_completed && (REGNO (operands[0]) != ACCL_REGNO)" ++ [(parallel ++ [(set (reg:SI ARCV2_ACC) ++ (plus:SI (mult:SI (sign_extend:SI (match_dup 1)) ++ (sign_extend:SI (match_dup 2))) ++ (reg:SI ARCV2_ACC))) ++ (clobber (reg:DI ARCV2_ACC))]) ++ (set (match_dup 0) (reg:SI ARCV2_ACC))] ++ "" + [(set_attr "length" "4") + (set_attr "type" "multi") + (set_attr "predicable" "no") +@@ -6087,19 +6098,31 @@ + rtx acc_reg = gen_rtx_REG (SImode, ACC_REG_FIRST); + + emit_move_insn (acc_reg, operands[3]); +- emit_insn (gen_umachi (operands[1], operands[2])); +- emit_move_insn (operands[0], acc_reg); ++ emit_insn (gen_umachi (operands[0], operands[1], operands[2])); + DONE; + }") + +-(define_insn "umachi" +- [(set (reg:SI ARCV2_ACC) ++ ++(define_insn_and_split "umachi" ++ [(set (match_operand:SI 0 "register_operand" "=Ral,r") + (plus:SI +- (mult:SI (zero_extend:SI (match_operand:HI 0 "register_operand" "%r")) +- (zero_extend:SI (match_operand:HI 1 "register_operand" "r"))) +- (reg:SI ARCV2_ACC)))] ++ (mult:SI (zero_extend:SI (match_operand:HI 1 "register_operand" "%r,r")) ++ (zero_extend:SI (match_operand:HI 2 "register_operand" "r,r"))) ++ (reg:SI ARCV2_ACC))) ++ (clobber (reg:DI ARCV2_ACC))] + "TARGET_PLUS_MACD" +- "vmac2hu\\t0,%0,%1" ++ "@ ++ vmac2hu\\t%0,%1,%2 ++ #" ++ "&& reload_completed && (REGNO (operands[0]) != ACCL_REGNO)" ++ [(parallel ++ [(set (reg:SI ARCV2_ACC) ++ (plus:SI (mult:SI (zero_extend:SI (match_dup 1)) ++ (zero_extend:SI (match_dup 2))) ++ (reg:SI ARCV2_ACC))) ++ (clobber (reg:DI ARCV2_ACC))]) ++ (set (match_dup 0) (reg:SI ARCV2_ACC))] ++ "" + [(set_attr "length" "4") + (set_attr "type" "multi") + (set_attr "predicable" "no") diff --git a/packages/gcc/11.3.0/0007-arc-Fix-maddhisi-patterns.patch b/packages/gcc/11.3.0/0007-arc-Fix-maddhisi-patterns.patch new file mode 100644 index 00000000..e4233a36 --- /dev/null +++ b/packages/gcc/11.3.0/0007-arc-Fix-maddhisi-patterns.patch @@ -0,0 +1,126 @@ +From e73e3c3eaf2c3ea45083dda5dc4b7d29f6a03238 Mon Sep 17 00:00:00 2001 +From: Claudiu Zissulescu +Date: Wed, 6 Oct 2021 09:47:50 +0300 +Subject: [PATCH] arc: Fix maddhisi patterns + +See for more details: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/429 + +--- + gcc/config/arc/arc.md | 43 +++++++--------------------------- + gcc/testsuite/gcc.target/arc/tmac-4.c | 29 ++++++++++++++++++++++ + 2 files changed, 39 insertions(+), 33 deletions(-) + create mode 100644 gcc/testsuite/gcc.target/arc/tmac-4.c + +--- a/gcc/config/arc/arc.md ++++ b/gcc/config/arc/arc.md +@@ -6055,33 +6055,22 @@ + (match_operand:SI 3 "register_operand" "")] + "TARGET_PLUS_MACD" + "{ +- rtx acc_reg = gen_rtx_REG (SImode, ACC_REG_FIRST); ++ rtx acc_reg = gen_rtx_REG (SImode, ACCL_REGNO); + + emit_move_insn (acc_reg, operands[3]); +- emit_insn (gen_machi (operands[0], operands[1], operands[2])); ++ emit_insn (gen_machi (operands[0], operands[1], operands[2], acc_reg)); + DONE; + }") + +-(define_insn_and_split "machi" ++(define_insn "machi" + [(set (match_operand:SI 0 "register_operand" "=Ral,r") + (plus:SI + (mult:SI (sign_extend:SI (match_operand:HI 1 "register_operand" "%r,r")) + (sign_extend:SI (match_operand:HI 2 "register_operand" "r,r"))) +- (reg:SI ARCV2_ACC))) ++ (match_operand:SI 3 "accl_operand" ""))) + (clobber (reg:DI ARCV2_ACC))] + "TARGET_PLUS_MACD" +- "@ +- vmac2h\\t%0,%1,%2 +- #" +- "&& reload_completed && (REGNO (operands[0]) != ACCL_REGNO)" +- [(parallel +- [(set (reg:SI ARCV2_ACC) +- (plus:SI (mult:SI (sign_extend:SI (match_dup 1)) +- (sign_extend:SI (match_dup 2))) +- (reg:SI ARCV2_ACC))) +- (clobber (reg:DI ARCV2_ACC))]) +- (set (match_dup 0) (reg:SI ARCV2_ACC))] +- "" ++ "dmach\\t%0,%1,%2" + [(set_attr "length" "4") + (set_attr "type" "multi") + (set_attr "predicable" "no") +@@ -6095,34 +6084,22 @@ + (match_operand:SI 3 "register_operand" "")] + "TARGET_PLUS_MACD" + "{ +- rtx acc_reg = gen_rtx_REG (SImode, ACC_REG_FIRST); ++ rtx acc_reg = gen_rtx_REG (SImode, ACCL_REGNO); + + emit_move_insn (acc_reg, operands[3]); +- emit_insn (gen_umachi (operands[0], operands[1], operands[2])); ++ emit_insn (gen_umachi (operands[0], operands[1], operands[2], acc_reg)); + DONE; + }") + +- +-(define_insn_and_split "umachi" ++(define_insn "umachi" + [(set (match_operand:SI 0 "register_operand" "=Ral,r") + (plus:SI + (mult:SI (zero_extend:SI (match_operand:HI 1 "register_operand" "%r,r")) + (zero_extend:SI (match_operand:HI 2 "register_operand" "r,r"))) +- (reg:SI ARCV2_ACC))) ++ (match_operand:SI 3 "accl_operand" ""))) + (clobber (reg:DI ARCV2_ACC))] + "TARGET_PLUS_MACD" +- "@ +- vmac2hu\\t%0,%1,%2 +- #" +- "&& reload_completed && (REGNO (operands[0]) != ACCL_REGNO)" +- [(parallel +- [(set (reg:SI ARCV2_ACC) +- (plus:SI (mult:SI (zero_extend:SI (match_dup 1)) +- (zero_extend:SI (match_dup 2))) +- (reg:SI ARCV2_ACC))) +- (clobber (reg:DI ARCV2_ACC))]) +- (set (match_dup 0) (reg:SI ARCV2_ACC))] +- "" ++ "dmachu\\t%0,%1,%2" + [(set_attr "length" "4") + (set_attr "type" "multi") + (set_attr "predicable" "no") +--- /dev/null ++++ b/gcc/testsuite/gcc.target/arc/tmac-4.c +@@ -0,0 +1,29 @@ ++/* { dg-do compile } */ ++/* { dg-skip-if "" { ! { clmcpu } } } */ ++/* { dg-options "-O3 -mbig-endian -mcpu=hs38" } */ ++ ++struct a {}; ++struct b { ++ int c; ++ int d; ++}; ++ ++struct { ++ struct a e; ++ struct b f[]; ++} g; ++short h; ++ ++extern void bar (int *); ++ ++int foo(void) ++{ ++ struct b *a; ++ for (;;) ++ { ++ a = &g.f[h]; ++ bar(&a->d); ++ } ++} ++ ++/* { dg-final { scan-assembler "dmach" } } */ diff --git a/packages/gcc/11.3.0/0008-Darwin-aarch64-Initial-support-for-the-self-host-dri.patch b/packages/gcc/11.3.0/0008-Darwin-aarch64-Initial-support-for-the-self-host-dri.patch new file mode 100644 index 00000000..ab73edba --- /dev/null +++ b/packages/gcc/11.3.0/0008-Darwin-aarch64-Initial-support-for-the-self-host-dri.patch @@ -0,0 +1,88 @@ +From 834c8749ced550af3f17ebae4072fb7dfb90d271 Mon Sep 17 00:00:00 2001 +From: Iain Sandoe +Date: Tue, 18 Aug 2020 22:29:51 +0100 +Subject: [PATCH] Darwin, aarch64 : Initial support for the self-host driver. + +At present, there is no special action needed for aarch64-darwin +this just pulls in generic Darwin code. + +Signed-off-by: Iain Sandoe + +gcc/ChangeLog: + + * config.host: Add support for aarch64-*-darwin. + * config/aarch64/host-aarch64-darwin.c: New file. + * config/aarch64/x-darwin: New file. +--- + gcc/config.host | 7 +++++- + gcc/config/aarch64/host-aarch64-darwin.c | 33 +++++++++++++++++++++++++++++++ + gcc/config/aarch64/x-darwin | 3 ++ + 3 files changed, 42 insertions(+), 1 deletion(-) + create mode 100644 gcc/config/aarch64/host-aarch64-darwin.c + create mode 100644 gcc/config/aarch64/x-darwin + +--- a/gcc/config.host ++++ b/gcc/config.host +@@ -99,7 +99,8 @@ + esac + + case ${host} in +- aarch64*-*-freebsd* | aarch64*-*-linux* | aarch64*-*-fuchsia*) ++ aarch64*-*-freebsd* | aarch64*-*-linux* | aarch64*-*-fuchsia* |\ ++ aarch64*-*-darwin*) + case ${target} in + aarch64*-*-*) + host_extra_gcc_objs="driver-aarch64.o" +@@ -251,6 +252,10 @@ + host_extra_gcc_objs="${host_extra_gcc_objs} driver-mingw32.o" + host_lto_plugin_soname=liblto_plugin.dll + ;; ++ aarch64*-*-darwin*) ++ out_host_hook_obj="${out_host_hook_obj} host-aarch64-darwin.o" ++ host_xmake_file="${host_xmake_file} aarch64/x-darwin" ++ ;; + i[34567]86-*-darwin* | x86_64-*-darwin*) + out_host_hook_obj="${out_host_hook_obj} host-i386-darwin.o" + host_xmake_file="${host_xmake_file} i386/x-darwin" +--- /dev/null ++++ b/gcc/config/aarch64/host-aarch64-darwin.c +@@ -0,0 +1,33 @@ ++/* aarch64/arm64-darwin host-specific hook definitions. ++ ++Copyright The GNU Toolchain Authors. ++ ++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 ++. */ ++ ++#define IN_TARGET_CODE 1 ++ ++#include "config.h" ++#include "system.h" ++#include "coretypes.h" ++#include "hosthooks.h" ++#include "hosthooks-def.h" ++#include "config/host-darwin.h" ++ ++/* Darwin doesn't do anything special for arm64/aarch64 hosts; this file ++ exists just to include the generic config/host-darwin.h. */ ++ ++const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER; +--- /dev/null ++++ b/gcc/config/aarch64/x-darwin +@@ -0,0 +1,3 @@ ++host-aarch64-darwin.o : $(srcdir)/config/aarch64/host-aarch64-darwin.c ++ $(COMPILE) $< ++ $(POSTCOMPILE) diff --git a/packages/gcc/11.3.0/0009-libstdc-Check-for-TLS-support-on-mingw-cross-compile.patch b/packages/gcc/11.3.0/0009-libstdc-Check-for-TLS-support-on-mingw-cross-compile.patch new file mode 100644 index 00000000..feece2d1 --- /dev/null +++ b/packages/gcc/11.3.0/0009-libstdc-Check-for-TLS-support-on-mingw-cross-compile.patch @@ -0,0 +1,244 @@ +From cc1e28878a228b6c4a0872e56d97ac88971b7725 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= +Date: Tue, 14 Sep 2021 16:41:37 +0100 +Subject: [PATCH] libstdc++: Check for TLS support on mingw cross-compilers + +Native mingw builds enable TLS, but crosses don't because we don't use +GCC_CHECK_TLS in the cross-compiler config. + +libstdc++-v3/ChangeLog: + + * crossconfig.m4: Check for TLS support on mingw. + * configure: Regenerate. +--- + libstdc++-v3/configure | 208 ++++++++++++++++++++++++++++++++++++++++++++ + libstdc++-v3/crossconfig.m4 | 1 + 2 files changed, 209 insertions(+) + +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -60379,6 +60379,214 @@ + fi + done + ++ ++ ++ # Check whether --enable-tls was given. ++if test "${enable_tls+set}" = set; then : ++ enableval=$enable_tls; ++ case "$enableval" in ++ yes|no) ;; ++ *) as_fn_error $? "Argument to enable/disable tls must be yes or no" "$LINENO" 5 ;; ++ esac ++ ++else ++ enable_tls=yes ++fi ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports thread-local storage" >&5 ++$as_echo_n "checking whether the target supports thread-local storage... " >&6; } ++if ${gcc_cv_have_tls+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ++ if test "$cross_compiling" = yes; then : ++ if test x$gcc_no_link = xyes; then ++ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 ++fi ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++__thread int a; int b; int main() { return a = b; } ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ chktls_save_LDFLAGS="$LDFLAGS" ++ case $host in ++ *-*-linux* | -*-uclinuxfdpic*) ++ LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS" ++ ;; ++ esac ++ chktls_save_CFLAGS="$CFLAGS" ++ CFLAGS="-fPIC $CFLAGS" ++ if test x$gcc_no_link = xyes; then ++ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 ++fi ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++int f() { return 0; } ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ if test x$gcc_no_link = xyes; then ++ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 ++fi ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++__thread int a; int b; int f() { return a = b; } ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ gcc_cv_have_tls=yes ++else ++ gcc_cv_have_tls=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++else ++ gcc_cv_have_tls=yes ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ CFLAGS="$chktls_save_CFLAGS" ++ LDFLAGS="$chktls_save_LDFLAGS" ++else ++ gcc_cv_have_tls=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ ++ ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++__thread int a; int b; int main() { return a = b; } ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ chktls_save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="-static $LDFLAGS" ++ if test x$gcc_no_link = xyes; then ++ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 ++fi ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++int main() { return 0; } ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ if test "$cross_compiling" = yes; then : ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error $? "cannot run test program while cross compiling ++See \`config.log' for more details" "$LINENO" 5; } ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++__thread int a; int b; int main() { return a = b; } ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gcc_cv_have_tls=yes ++else ++ gcc_cv_have_tls=no ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi ++ ++else ++ gcc_cv_have_tls=yes ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ LDFLAGS="$chktls_save_LDFLAGS" ++ if test $gcc_cv_have_tls = yes; then ++ chktls_save_CFLAGS="$CFLAGS" ++ thread_CFLAGS=failed ++ for flag in '' '-pthread' '-lpthread'; do ++ CFLAGS="$flag $chktls_save_CFLAGS" ++ if test x$gcc_no_link = xyes; then ++ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 ++fi ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++ void *g(void *d) { return NULL; } ++int ++main () ++{ ++pthread_t t; pthread_create(&t,NULL,g,NULL); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ thread_CFLAGS="$flag" ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ if test "X$thread_CFLAGS" != Xfailed; then ++ break ++ fi ++ done ++ CFLAGS="$chktls_save_CFLAGS" ++ if test "X$thread_CFLAGS" != Xfailed; then ++ CFLAGS="$thread_CFLAGS $chktls_save_CFLAGS" ++ if test "$cross_compiling" = yes; then : ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error $? "cannot run test program while cross compiling ++See \`config.log' for more details" "$LINENO" 5; } ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++ __thread int a; ++ static int *volatile a_in_other_thread; ++ static void * ++ thread_func (void *arg) ++ { ++ a_in_other_thread = &a; ++ return (void *)0; ++ } ++int ++main () ++{ ++pthread_t thread; ++ void *thread_retval; ++ int *volatile a_in_main_thread; ++ a_in_main_thread = &a; ++ if (pthread_create (&thread, (pthread_attr_t *)0, ++ thread_func, (void *)0)) ++ return 0; ++ if (pthread_join (thread, &thread_retval)) ++ return 0; ++ return (a_in_other_thread == a_in_main_thread); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gcc_cv_have_tls=yes ++else ++ gcc_cv_have_tls=no ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi ++ ++ CFLAGS="$chktls_save_CFLAGS" ++ fi ++ fi ++else ++ gcc_cv_have_tls=no ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_have_tls" >&5 ++$as_echo "$gcc_cv_have_tls" >&6; } ++ if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then ++ ++$as_echo "#define HAVE_TLS 1" >>confdefs.h ++ ++ fi + ;; + *-netbsd* | *-openbsd*) + SECTION_FLAGS='-ffunction-sections -fdata-sections' +--- a/libstdc++-v3/crossconfig.m4 ++++ b/libstdc++-v3/crossconfig.m4 +@@ -204,6 +204,7 @@ + GLIBCXX_CHECK_STDLIB_SUPPORT + AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc) + AC_CHECK_FUNCS(_wfopen) ++ GCC_CHECK_TLS + ;; + *-netbsd* | *-openbsd*) + SECTION_FLAGS='-ffunction-sections -fdata-sections' diff --git a/packages/gcc/11.3.0/chksum b/packages/gcc/11.3.0/chksum new file mode 100644 index 00000000..e5e8d647 --- /dev/null +++ b/packages/gcc/11.3.0/chksum @@ -0,0 +1,8 @@ +md5 gcc-11.3.0.tar.xz 4ee3e8c4c99e7b3444eb79f00f5f7a7e +sha1 gcc-11.3.0.tar.xz cf86a48278f9a6f4b03d4390550577b20353b4e9 +sha256 gcc-11.3.0.tar.xz b47cf2818691f5b1e21df2bb38c795fac2cfbd640ede2d0a5e1c89e338a3ac39 +sha512 gcc-11.3.0.tar.xz f0be5ad705c73b84477128a69c047f57dd47002f375eb60e1e842e08cf2009a509e92152bca345823926d550b7395ae6d4de7db51d1ee371c2dc37313881fca7 +md5 gcc-11.3.0.tar.gz b29cf744540c87262fb82e550aa24b11 +sha1 gcc-11.3.0.tar.gz 5bc5f1582f7ad1024b50a31e1d28865d330f18b9 +sha256 gcc-11.3.0.tar.gz 98438e6cc7294298b474cf0da7655d9a8c8b796421bb0210531c294a950374ed +sha512 gcc-11.3.0.tar.gz 8f84f4d0639ffeb81f57f0e2c81acdab6f1045217bc7b333e6638581abd442bf2a524480208b3a439a5880a661144dbbd1aa14c6b70c6a8388111be493163156 diff --git a/packages/gcc/11.3.0/version.desc b/packages/gcc/11.3.0/version.desc new file mode 100644 index 00000000..e69de29b -- cgit v1.2.3