aboutsummaryrefslogtreecommitdiff
path: root/packages/gcc/11.4.0
diff options
context:
space:
mode:
authorChris Packham <judge.packham@gmail.com>2023-05-09 20:14:51 +1200
committerChris Packham <judge.packham@gmail.com>2023-05-31 20:21:59 +1200
commitd855363eee3848fd5c5f3aa1477a7d03fa4886c0 (patch)
treea0a931c7a4bbea4dcfc23f726ac667da289f1c37 /packages/gcc/11.4.0
parent72e07cce8faef4c584cb9eff47ba922fe0db461f (diff)
downloadcrosstool-ng-d855363eee3848fd5c5f3aa1477a7d03fa4886c0.tar.gz
crosstool-ng-d855363eee3848fd5c5f3aa1477a7d03fa4886c0.tar.bz2
crosstool-ng-d855363eee3848fd5c5f3aa1477a7d03fa4886c0.zip
gcc: Add 11.4.0
Add gcc 11.4.0 and regenerate patches against the new version. https://gcc.gnu.org/pipermail/gcc-announce/2023/000177.html https://gcc.gnu.org/gcc-11/changes.html Signed-off-by: Chris Packham <judge.packham@gmail.com>
Diffstat (limited to 'packages/gcc/11.4.0')
-rw-r--r--packages/gcc/11.4.0/0000-libtool-leave-framework-alone.patch18
-rw-r--r--packages/gcc/11.4.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch14
-rw-r--r--packages/gcc/11.4.0/0002-arm-softfloat-libgcc.patch31
-rw-r--r--packages/gcc/11.4.0/0003-libgcc-disable-split-stack-nothreads.patch17
-rw-r--r--packages/gcc/11.4.0/0004-Remove-use-of-include_next-from-c-headers.patch262
-rw-r--r--packages/gcc/11.4.0/0005-arc-Update-ZOL-pattern.patch44
-rw-r--r--packages/gcc/11.4.0/0006-arc-Update-u-maddhisi4-patterns.patch115
-rw-r--r--packages/gcc/11.4.0/0007-arc-Fix-maddhisi-patterns.patch126
-rw-r--r--packages/gcc/11.4.0/0008-Darwin-aarch64-Initial-support-for-the-self-host-dri.patch88
-rw-r--r--packages/gcc/11.4.0/0009-libstdc-Check-for-TLS-support-on-mingw-cross-compile.patch244
-rw-r--r--packages/gcc/11.4.0/0010-fixinc-don-t-fix-machine-names-in-__has_include-.PR.patch115
-rw-r--r--packages/gcc/11.4.0/chksum8
-rw-r--r--packages/gcc/11.4.0/version.desc0
13 files changed, 1082 insertions, 0 deletions
diff --git a/packages/gcc/11.4.0/0000-libtool-leave-framework-alone.patch b/packages/gcc/11.4.0/0000-libtool-leave-framework-alone.patch
new file mode 100644
index 00000000..1a86e415
--- /dev/null
+++ b/packages/gcc/11.4.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.4.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc/11.4.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch
new file mode 100644
index 00000000..5f9a07a2
--- /dev/null
+++ b/packages/gcc/11.4.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 <string>
+ #include <unistd.h>
+ #include <sys/types.h>
++#include <sys/select.h>
+ #include <string.h>
+ #include <errno.h>
+ #include "marshall.hh"
diff --git a/packages/gcc/11.4.0/0002-arm-softfloat-libgcc.patch b/packages/gcc/11.4.0/0002-arm-softfloat-libgcc.patch
new file mode 100644
index 00000000..d9800365
--- /dev/null
+++ b/packages/gcc/11.4.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.4.0/0003-libgcc-disable-split-stack-nothreads.patch b/packages/gcc/11.4.0/0003-libgcc-disable-split-stack-nothreads.patch
new file mode 100644
index 00000000..df91a9ff
--- /dev/null
+++ b/packages/gcc/11.4.0/0003-libgcc-disable-split-stack-nothreads.patch
@@ -0,0 +1,17 @@
+disable split-stack for non-thread builds
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+
+---
+ 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.4.0/0004-Remove-use-of-include_next-from-c-headers.patch b/packages/gcc/11.4.0/0004-Remove-use-of-include_next-from-c-headers.patch
new file mode 100644
index 00000000..920e64da
--- /dev/null
+++ b/packages/gcc/11.4.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 <keithp@keithp.com>
+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 <keithp@keithp.com>
+---
+ 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 <bits/c++config.h>
+
+ #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
+-#include_next <stdlib.h>
++#include <stdlib.h>
+ #ifdef __CORRECT_ISO_CPP_MATH_H_PROTO
+-# include_next <math.h>
++# include <math.h>
+ #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 <bits/c++config.h>
+-#include_next <assert.h>
++#include <assert.h>
+--- a/libstdc++-v3/include/c/cctype
++++ b/libstdc++-v3/include/c/cctype
+@@ -31,6 +31,6 @@
+
+ #pragma GCC system_header
+
+-#include_next <ctype.h>
++#include <ctype.h>
+
+ #endif
+--- a/libstdc++-v3/include/c/cerrno
++++ b/libstdc++-v3/include/c/cerrno
+@@ -41,7 +41,7 @@
+ #pragma GCC system_header
+
+ #include <bits/c++config.h>
+-#include_next <errno.h>
++#include <errno.h>
+
+ // 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 <bits/c++config.h>
+-#include_next <float.h>
++#include <float.h>
+
+ #endif
+--- a/libstdc++-v3/include/c/climits
++++ b/libstdc++-v3/include/c/climits
+@@ -32,6 +32,6 @@
+ #pragma GCC system_header
+
+ #include <bits/c++config.h>
+-#include_next <limits.h>
++#include <limits.h>
+
+ #endif
+--- a/libstdc++-v3/include/c/clocale
++++ b/libstdc++-v3/include/c/clocale
+@@ -31,6 +31,6 @@
+
+ #pragma GCC system_header
+
+-#include_next <locale.h>
++#include <locale.h>
+
+ #endif
+--- a/libstdc++-v3/include/c/cmath
++++ b/libstdc++-v3/include/c/cmath
+@@ -33,7 +33,7 @@
+
+ #include <bits/c++config.h>
+
+-#include_next <math.h>
++#include <math.h>
+
+ // Get rid of those macros defined in <math.h> 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 <setjmp.h>
++#include <setjmp.h>
+
+ // Get rid of those macros defined in <setjmp.h> 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 <signal.h>
++#include <signal.h>
+
+ #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 <stdarg.h>
++#include <stdarg.h>
+
+ #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 <stddef.h>
++#include <stddef.h>
+
+ #endif
+--- a/libstdc++-v3/include/c/cstdio
++++ b/libstdc++-v3/include/c/cstdio
+@@ -31,7 +31,7 @@
+
+ #pragma GCC system_header
+
+-#include_next <stdio.h>
++#include <stdio.h>
+
+ // Get rid of those macros defined in <stdio.h> 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 <stdlib.h>
++#include <stdlib.h>
+
+ #endif
+--- a/libstdc++-v3/include/c/cstring
++++ b/libstdc++-v3/include/c/cstring
+@@ -31,6 +31,6 @@
+
+ #pragma GCC system_header
+
+-#include_next <string.h>
++#include <string.h>
+
+ #endif
+--- a/libstdc++-v3/include/c/ctime
++++ b/libstdc++-v3/include/c/ctime
+@@ -31,6 +31,6 @@
+
+ #pragma GCC system_header
+
+-#include_next <time.h>
++#include <time.h>
+
+ #endif
+--- a/libstdc++-v3/include/c/cuchar
++++ b/libstdc++-v3/include/c/cuchar
+@@ -39,7 +39,7 @@
+ #include <cwchar>
+
+ #if _GLIBCXX_USE_C11_UCHAR_CXX11
+-# include_next <uchar.h>
++# include <uchar.h>
+ #endif
+
+ #endif // C++11
+--- a/libstdc++-v3/include/c/cwchar
++++ b/libstdc++-v3/include/c/cwchar
+@@ -36,7 +36,7 @@
+ #include <ctime>
+
+ #if _GLIBCXX_HAVE_WCHAR_H
+-#include_next <wchar.h>
++#include <wchar.h>
+ #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 <bits/c++config.h>
+
+ #if _GLIBCXX_HAVE_WCTYPE_H
+-#include_next <wctype.h>
++#include <wctype.h>
+ #endif
+
+ #endif
+--- a/libstdc++-v3/include/c_global/cmath
++++ b/libstdc++-v3/include/c_global/cmath
+@@ -42,7 +42,7 @@
+ #include <bits/cpp_type_traits.h>
+ #include <ext/type_traits.h>
+ #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
+-#include_next <math.h>
++#include <math.h>
+ #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS
+ #include <bits/std_abs.h>
+
+--- 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 <stdlib.h> not a libstdc++
+ // wrapper that might already be installed later in the include search path.
+ #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
+-#include_next <stdlib.h>
++#include <stdlib.h>
+ #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS
+ #include <bits/std_abs.h>
+
diff --git a/packages/gcc/11.4.0/0005-arc-Update-ZOL-pattern.patch b/packages/gcc/11.4.0/0005-arc-Update-ZOL-pattern.patch
new file mode 100644
index 00000000..361c9dbe
--- /dev/null
+++ b/packages/gcc/11.4.0/0005-arc-Update-ZOL-pattern.patch
@@ -0,0 +1,44 @@
+From 7efc628f79a1801b292623dfe5aa8c53a61a2121 Mon Sep 17 00:00:00 2001
+From: Claudiu Zissulescu <claziss@synopsys.com>
+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 <claziss@synopsys.com>
+---
+ 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.4.0/0006-arc-Update-u-maddhisi4-patterns.patch b/packages/gcc/11.4.0/0006-arc-Update-u-maddhisi4-patterns.patch
new file mode 100644
index 00000000..8b0c34f7
--- /dev/null
+++ b/packages/gcc/11.4.0/0006-arc-Update-u-maddhisi4-patterns.patch
@@ -0,0 +1,115 @@
+From b3873d67e4e8a1f16efbfa6ad7d73b9809bb2dd2 Mon Sep 17 00:00:00 2001
+From: Claudiu Zissulescu <claziss@synopsys.com>
+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 <claziss@synopsys.com>
+---
+ 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.4.0/0007-arc-Fix-maddhisi-patterns.patch b/packages/gcc/11.4.0/0007-arc-Fix-maddhisi-patterns.patch
new file mode 100644
index 00000000..e4233a36
--- /dev/null
+++ b/packages/gcc/11.4.0/0007-arc-Fix-maddhisi-patterns.patch
@@ -0,0 +1,126 @@
+From e73e3c3eaf2c3ea45083dda5dc4b7d29f6a03238 Mon Sep 17 00:00:00 2001
+From: Claudiu Zissulescu <claziss@synopsys.com>
+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.4.0/0008-Darwin-aarch64-Initial-support-for-the-self-host-dri.patch b/packages/gcc/11.4.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.4.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 <iain@sandoe.co.uk>
+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 <iain@sandoe.co.uk>
+
+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
++<http://www.gnu.org/licenses/>. */
++
++#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.4.0/0009-libstdc-Check-for-TLS-support-on-mingw-cross-compile.patch b/packages/gcc/11.4.0/0009-libstdc-Check-for-TLS-support-on-mingw-cross-compile.patch
new file mode 100644
index 00000000..abd82ffe
--- /dev/null
+++ b/packages/gcc/11.4.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?= <hugo@beauzee.fr>
+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
+@@ -60390,6 +60390,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 <pthread.h>
++ 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 <pthread.h>
++ __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.4.0/0010-fixinc-don-t-fix-machine-names-in-__has_include-.PR.patch b/packages/gcc/11.4.0/0010-fixinc-don-t-fix-machine-names-in-__has_include-.PR.patch
new file mode 100644
index 00000000..69afa335
--- /dev/null
+++ b/packages/gcc/11.4.0/0010-fixinc-don-t-fix-machine-names-in-__has_include-.PR.patch
@@ -0,0 +1,115 @@
+From de3f4ee9a5bd2adcb5ff2e1690db2567fda1473c Mon Sep 17 00:00:00 2001
+From: Xi Ruoyao <xry111@mengyan1223.wang>
+Date: Mon, 28 Jun 2021 13:54:58 +0800
+Subject: [PATCH] fixinc: don't "fix" machine names in __has_include(...)
+ [PR91085]
+
+fixincludes/
+
+ PR other/91085
+ * fixfixes.c (check_has_inc): New static function.
+ (machine_name_fix): Don't replace header names in
+ __has_include(...).
+ * inclhack.def (machine_name): Adjust test.
+ * tests/base/testing.h: Update.
+
+Upstream: 6bf383c37e6131a8e247e8a0997d55d65c830b6d
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+---
+ fixincludes/fixfixes.c | 45 +++++++++++++++++++++++++++++++++++++--
+ fixincludes/inclhack.def | 3 +-
+ fixincludes/tests/base/testing.h | 2 -
+ 3 files changed, 46 insertions(+), 4 deletions(-)
+
+--- a/fixincludes/fixfixes.c
++++ b/fixincludes/fixfixes.c
+@@ -477,6 +477,39 @@
+ fputs (text, stdout);
+ }
+
++/* Check if the pattern at pos is actually in a "__has_include(...)"
++ directive. Return the pointer to the ')' of this
++ "__has_include(...)" if it is, NULL otherwise. */
++static const char *
++check_has_inc (const char *begin, const char *pos, const char *end)
++{
++ static const char has_inc[] = "__has_include";
++ const size_t has_inc_len = sizeof (has_inc) - 1;
++ const char *p;
++
++ for (p = memmem (begin, pos - begin, has_inc, has_inc_len);
++ p != NULL;
++ p = memmem (p, pos - p, has_inc, has_inc_len))
++ {
++ p += has_inc_len;
++ while (p < end && ISSPACE (*p))
++ p++;
++
++ /* "__has_include" may appear as "defined(__has_include)",
++ search for the next appearance then. */
++ if (*p != '(')
++ continue;
++
++ /* To avoid too much complexity, just hope there is never a
++ ')' in a header name. */
++ p = memchr (p, ')', end - p);
++ if (p == NULL || p > pos)
++ return p;
++ }
++
++ return NULL;
++}
++
+ /* Fix for machine name #ifdefs that are not in the namespace reserved
+ by the C standard. They won't be defined if compiling with -ansi,
+ and the headers will break. We go to some trouble to only change
+@@ -524,7 +557,7 @@
+ /* If the 'name_pat' matches in between base and limit, we have
+ a bogon. It is not worth the hassle of excluding comments
+ because comments on #if/#ifdef lines are rare, and strings on
+- such lines are illegal.
++ such lines are only legal in a "__has_include" directive.
+
+ REG_NOTBOL means 'base' is not at the beginning of a line, which
+ shouldn't matter since the name_re has no ^ anchor, but let's
+@@ -544,8 +577,16 @@
+ break;
+
+ p = base + match[0].rm_so;
+- base += match[0].rm_eo;
+
++ /* Check if the match is in __has_include(...) (PR 91085). */
++ q = check_has_inc (base, p, limit);
++ if (q)
++ {
++ base = q + 1;
++ goto again;
++ }
++
++ base += match[0].rm_eo;
+ /* One more test: if on the same line we have the same string
+ with the appropriate underscores, then leave it alone.
+ We want exactly two leading and trailing underscores. */
+--- a/fixincludes/inclhack.def
++++ b/fixincludes/inclhack.def
+@@ -3201,7 +3201,8 @@
+ c_fix = machine_name;
+
+ test_text = "/* MACH_DIFF: */\n"
+- "#if defined( i386 ) || defined( sparc ) || defined( vax )"
++ "#if defined( i386 ) || defined( sparc ) || defined( vax ) || "
++ "defined( linux ) || __has_include ( <linux.h> )"
+ "\n/* no uniform test, so be careful :-) */";
+ };
+
+--- a/fixincludes/tests/base/testing.h
++++ b/fixincludes/tests/base/testing.h
+@@ -64,7 +64,7 @@
+
+ #if defined( MACHINE_NAME_CHECK )
+ /* MACH_DIFF: */
+-#if defined( i386 ) || defined( sparc ) || defined( vax )
++#if defined( i386 ) || defined( sparc ) || defined( vax ) || defined( linux ) || __has_include ( <linux.h> )
+ /* no uniform test, so be careful :-) */
+ #endif /* MACHINE_NAME_CHECK */
+
diff --git a/packages/gcc/11.4.0/chksum b/packages/gcc/11.4.0/chksum
new file mode 100644
index 00000000..e6e5de42
--- /dev/null
+++ b/packages/gcc/11.4.0/chksum
@@ -0,0 +1,8 @@
+md5 gcc-11.4.0.tar.xz 3ec67dbe6fac4c3aa3b95250aa545b24
+sha1 gcc-11.4.0.tar.xz 03f21dce9edf9092e38b4e23dd27b29f6ab56f63
+sha256 gcc-11.4.0.tar.xz 3f2db222b007e8a4a23cd5ba56726ef08e8b1f1eb2055ee72c1402cea73a8dd9
+sha512 gcc-11.4.0.tar.xz a5018bf1f1fa25ddf33f46e720675d261987763db48e7a5fdf4c26d3150a8abcb82fdc413402df1c32f2e6b057d9bae6bdfa026defc4030e10144a8532e60f14
+md5 gcc-11.4.0.tar.gz 555f990ed0cc31537c0731895e1273fe
+sha1 gcc-11.4.0.tar.gz bc457d3c9bcfa5c9fb59af3cbf45dfafc3f39752
+sha256 gcc-11.4.0.tar.gz af828619dd1970734dda3cfb792ea3f2cba61b5a00170ba8bce4910749d73c07
+sha512 gcc-11.4.0.tar.gz de22be3bc3ec7deab0db9b1de1cb70c4721991a6d2865d6d77900369cc2748127e4cf866763fd267ec58dbf4cfb62bd364e0eced0547a9fc5dedd4f4f7bc6661
diff --git a/packages/gcc/11.4.0/version.desc b/packages/gcc/11.4.0/version.desc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/packages/gcc/11.4.0/version.desc