diff options
Diffstat (limited to 'packages/gcc/11.5.0')
14 files changed, 1205 insertions, 0 deletions
diff --git a/packages/gcc/11.5.0/0000-libtool-leave-framework-alone.patch b/packages/gcc/11.5.0/0000-libtool-leave-framework-alone.patch new file mode 100644 index 00000000..1a86e415 --- /dev/null +++ b/packages/gcc/11.5.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.5.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc/11.5.0/0001-gcc-plugin-POSIX-include-sys-select-h.patch new file mode 100644 index 00000000..5f9a07a2 --- /dev/null +++ b/packages/gcc/11.5.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.5.0/0002-arm-softfloat-libgcc.patch b/packages/gcc/11.5.0/0002-arm-softfloat-libgcc.patch new file mode 100644 index 00000000..d9800365 --- /dev/null +++ b/packages/gcc/11.5.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.5.0/0003-libgcc-disable-split-stack-nothreads.patch b/packages/gcc/11.5.0/0003-libgcc-disable-split-stack-nothreads.patch new file mode 100644 index 00000000..df91a9ff --- /dev/null +++ b/packages/gcc/11.5.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.5.0/0004-Remove-use-of-include_next-from-c-headers.patch b/packages/gcc/11.5.0/0004-Remove-use-of-include_next-from-c-headers.patch new file mode 100644 index 00000000..fea58479 --- /dev/null +++ b/packages/gcc/11.5.0/0004-Remove-use-of-include_next-from-c-headers.patch @@ -0,0 +1,262 @@ +From b8991143b52c28815f1c5fb2593906fcf6902912 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.5.0/0005-arc-Update-ZOL-pattern.patch b/packages/gcc/11.5.0/0005-arc-Update-ZOL-pattern.patch new file mode 100644 index 00000000..4e309acf --- /dev/null +++ b/packages/gcc/11.5.0/0005-arc-Update-ZOL-pattern.patch @@ -0,0 +1,44 @@ +From 4c2e3d20fd6a74faf9aa765e724efa7bd73ffc04 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.5.0/0006-arc-Update-u-maddhisi4-patterns.patch b/packages/gcc/11.5.0/0006-arc-Update-u-maddhisi4-patterns.patch new file mode 100644 index 00000000..b6bd915f --- /dev/null +++ b/packages/gcc/11.5.0/0006-arc-Update-u-maddhisi4-patterns.patch @@ -0,0 +1,115 @@ +From f62aee446c2fa01016db09541d381f13b4fd08fa 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.5.0/0007-arc-Fix-maddhisi-patterns.patch b/packages/gcc/11.5.0/0007-arc-Fix-maddhisi-patterns.patch new file mode 100644 index 00000000..f97cf08d --- /dev/null +++ b/packages/gcc/11.5.0/0007-arc-Fix-maddhisi-patterns.patch @@ -0,0 +1,125 @@ +From 490f7d015f662fd33a902538a56143df35c25e96 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.5.0/0008-Darwin-aarch64-Initial-support-for-the-self-host-dri.patch b/packages/gcc/11.5.0/0008-Darwin-aarch64-Initial-support-for-the-self-host-dri.patch new file mode 100644 index 00000000..6544626b --- /dev/null +++ b/packages/gcc/11.5.0/0008-Darwin-aarch64-Initial-support-for-the-self-host-dri.patch @@ -0,0 +1,88 @@ +From 74d504ac36ff87207b109e05ae6661cd339877d5 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.5.0/0009-libstdc-Check-for-TLS-support-on-mingw-cross-compile.patch b/packages/gcc/11.5.0/0009-libstdc-Check-for-TLS-support-on-mingw-cross-compile.patch new file mode 100644 index 00000000..d8fe7475 --- /dev/null +++ b/packages/gcc/11.5.0/0009-libstdc-Check-for-TLS-support-on-mingw-cross-compile.patch @@ -0,0 +1,244 @@ +From 3f5e837021bd03a8a2540b7a9617d6cd7f96cdec 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 +@@ -60406,6 +60406,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.5.0/0010-fixinc-don-t-fix-machine-names-in-__has_include-.-PR.patch b/packages/gcc/11.5.0/0010-fixinc-don-t-fix-machine-names-in-__has_include-.-PR.patch new file mode 100644 index 00000000..a6ed79bb --- /dev/null +++ b/packages/gcc/11.5.0/0010-fixinc-don-t-fix-machine-names-in-__has_include-.-PR.patch @@ -0,0 +1,115 @@ +From e7ef2297372b4b433522f8af1f6fd9ca172d5f41 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 +@@ -3213,7 +3213,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.5.0/0011-Remove-crypt-and-crypt_r-interceptors.patch b/packages/gcc/11.5.0/0011-Remove-crypt-and-crypt_r-interceptors.patch new file mode 100644 index 00000000..0e1b6d23 --- /dev/null +++ b/packages/gcc/11.5.0/0011-Remove-crypt-and-crypt_r-interceptors.patch @@ -0,0 +1,124 @@ +From 4029717086ef0b1f08e6a7b6189038de5c3e72cc Mon Sep 17 00:00:00 2001 +From: Fangrui Song <i@maskray.me> +Date: Fri, 28 Apr 2023 09:59:17 -0700 +Subject: [PATCH] Remove crypt and crypt_r interceptors + +From Florian Weimer's D144073 + +> On GNU/Linux (glibc), the crypt and crypt_r functions are not part of the main shared object (libc.so.6), but libcrypt (with multiple possible sonames). The sanitizer libraries do not depend on libcrypt, so it can happen that during sanitizer library initialization, no real implementation will be found because the crypt, crypt_r functions are not present in the process image (yet). If its interceptors are called nevertheless, this results in a call through a null pointer when the sanitizer library attempts to forward the call to the real implementation. +> +> Many distributions have already switched to libxcrypt, a library that is separate from glibc and that can be build with sanitizers directly (avoiding the need for interceptors). This patch disables building the interceptor for glibc targets. + +Let's remove crypt and crypt_r interceptors (D68431) to fix issues with +newer glibc. + +For older glibc, msan will not know that an uninstrumented crypt_r call +initializes `data`, so there is a risk for false positives. However, with some +codebase survey, I think crypt_r uses are very few and the call sites typically +have a `memset(&data, 0, sizeof(data));` anyway. + +Fix https://github.com/google/sanitizers/issues/1365 +Related: https://bugzilla.redhat.com/show_bug.cgi?id=2169432 + +Reviewed By: #sanitizers, fweimer, thesamesam, vitalybuka + +Differential Revision: https://reviews.llvm.org/D149403 +--- + libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc | 37 ---------- + libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h | 2 + libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp | 2 + libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h | 1 + 4 files changed, 42 deletions(-) + +--- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc ++++ b/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc +@@ -9814,41 +9814,6 @@ + #define INIT_GETRANDOM + #endif + +-#if SANITIZER_INTERCEPT_CRYPT +-INTERCEPTOR(char *, crypt, char *key, char *salt) { +- void *ctx; +- COMMON_INTERCEPTOR_ENTER(ctx, crypt, key, salt); +- COMMON_INTERCEPTOR_READ_RANGE(ctx, key, internal_strlen(key) + 1); +- COMMON_INTERCEPTOR_READ_RANGE(ctx, salt, internal_strlen(salt) + 1); +- char *res = REAL(crypt)(key, salt); +- if (res != nullptr) +- COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, internal_strlen(res) + 1); +- return res; +-} +-#define INIT_CRYPT COMMON_INTERCEPT_FUNCTION(crypt); +-#else +-#define INIT_CRYPT +-#endif +- +-#if SANITIZER_INTERCEPT_CRYPT_R +-INTERCEPTOR(char *, crypt_r, char *key, char *salt, void *data) { +- void *ctx; +- COMMON_INTERCEPTOR_ENTER(ctx, crypt_r, key, salt, data); +- COMMON_INTERCEPTOR_READ_RANGE(ctx, key, internal_strlen(key) + 1); +- COMMON_INTERCEPTOR_READ_RANGE(ctx, salt, internal_strlen(salt) + 1); +- char *res = REAL(crypt_r)(key, salt, data); +- if (res != nullptr) { +- COMMON_INTERCEPTOR_WRITE_RANGE(ctx, data, +- __sanitizer::struct_crypt_data_sz); +- COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, internal_strlen(res) + 1); +- } +- return res; +-} +-#define INIT_CRYPT_R COMMON_INTERCEPT_FUNCTION(crypt_r); +-#else +-#define INIT_CRYPT_R +-#endif +- + #if SANITIZER_INTERCEPT_GETENTROPY + INTERCEPTOR(int, getentropy, void *buf, SIZE_T buflen) { + void *ctx; +@@ -10337,8 +10302,6 @@ + INIT_GETUSERSHELL; + INIT_SL_INIT; + INIT_GETRANDOM; +- INIT_CRYPT; +- INIT_CRYPT_R; + INIT_GETENTROPY; + INIT_QSORT; + INIT_QSORT_R; +--- a/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h +@@ -572,8 +572,6 @@ + #define SANITIZER_INTERCEPT_FDEVNAME SI_FREEBSD + #define SANITIZER_INTERCEPT_GETUSERSHELL (SI_POSIX && !SI_ANDROID) + #define SANITIZER_INTERCEPT_SL_INIT (SI_FREEBSD || SI_NETBSD) +-#define SANITIZER_INTERCEPT_CRYPT (SI_POSIX && !SI_ANDROID) +-#define SANITIZER_INTERCEPT_CRYPT_R (SI_LINUX && !SI_ANDROID) + + #define SANITIZER_INTERCEPT_GETRANDOM \ + ((SI_LINUX && __GLIBC_PREREQ(2, 25)) || SI_FREEBSD) +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -142,7 +142,6 @@ + #include <linux/serial.h> + #include <sys/msg.h> + #include <sys/ipc.h> +-#include <crypt.h> + #endif // SANITIZER_LINUX && !SANITIZER_ANDROID + + #if SANITIZER_ANDROID +@@ -244,7 +243,6 @@ + unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT; + unsigned struct_rlimit64_sz = sizeof(struct rlimit64); + unsigned struct_statvfs64_sz = sizeof(struct statvfs64); +- unsigned struct_crypt_data_sz = sizeof(struct crypt_data); + #endif // SANITIZER_LINUX && !SANITIZER_ANDROID + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -295,7 +295,6 @@ + extern unsigned struct_mq_attr_sz; + extern unsigned struct_timex_sz; + extern unsigned struct_statvfs_sz; +-extern unsigned struct_crypt_data_sz; + #endif // SANITIZER_LINUX && !SANITIZER_ANDROID + + struct __sanitizer_iovec { diff --git a/packages/gcc/11.5.0/chksum b/packages/gcc/11.5.0/chksum new file mode 100644 index 00000000..bc90fc36 --- /dev/null +++ b/packages/gcc/11.5.0/chksum @@ -0,0 +1,8 @@ +md5 gcc-11.5.0.tar.xz 03473f26c87e05e789a32208f1fe4491 +sha1 gcc-11.5.0.tar.xz a65b357c583e4ad8f95111d442ae51002c990f29 +sha256 gcc-11.5.0.tar.xz a6e21868ead545cf87f0c01f84276e4b5281d672098591c1c896241f09363478 +sha512 gcc-11.5.0.tar.xz 88f17d5a5e69eeb53aaf0a9bc9daab1c4e501d145b388c5485ebeb2cc36178fbb2d3e49ebef4a8c007a05e88471a06b97cf9b08870478249f77fbfa3d4abd9a8 +md5 gcc-11.5.0.tar.gz 17f3877204c7e215439257b2cec4330e +sha1 gcc-11.5.0.tar.gz 19e8339f20340c47bff84a63d14e75a8dd172344 +sha256 gcc-11.5.0.tar.gz 5a447f9a2566d15376beece02270decec8b8c1fcb094b93cb335b23497d58117 +sha512 gcc-11.5.0.tar.gz e66535b7901cfb5adfb23201c537f23743550e85ecef54eb960f8142080774af6a3997851969cf55fd7ceb8f3cf66c63227ff0315602aaeaf55f4284b12d612b diff --git a/packages/gcc/11.5.0/version.desc b/packages/gcc/11.5.0/version.desc new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/packages/gcc/11.5.0/version.desc |