From 23580a86aaabe601539cb1470bdfbca5513a1ac4 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Sun, 22 May 2022 18:06:03 +1200 Subject: gcc: drop libsanitizer patch for GCC12 For some reason GCC 12 ends up hitting the _MIPS_SIM_NABI32 case for Linux's arch/mips/include/uapi/asm/stat.h when building libsanitizer. This is basically the opposite of the problem from commit 1b6ad7cd ("gcc: Bring in fix for libsanitizer on mips64"). Dropping the patch resolves the issue for GCC 12. Fixes #1741 Signed-off-by: Chris Packham --- ...r-mips64-Set-struct_kernel_stat_sz-to-mat.patch | 26 --------- .../0005-sh-Avoid-mb-m1-multilib-combination.patch | 64 ++++++++++++++++++++++ .../0006-sh-Avoid-mb-m1-multilib-combination.patch | 64 ---------------------- 3 files changed, 64 insertions(+), 90 deletions(-) delete mode 100644 packages/gcc/12.1.0/0005-libsanitizer-mips64-Set-struct_kernel_stat_sz-to-mat.patch create mode 100644 packages/gcc/12.1.0/0005-sh-Avoid-mb-m1-multilib-combination.patch delete mode 100644 packages/gcc/12.1.0/0006-sh-Avoid-mb-m1-multilib-combination.patch (limited to 'packages/gcc') diff --git a/packages/gcc/12.1.0/0005-libsanitizer-mips64-Set-struct_kernel_stat_sz-to-mat.patch b/packages/gcc/12.1.0/0005-libsanitizer-mips64-Set-struct_kernel_stat_sz-to-mat.patch deleted file mode 100644 index cccc6569..00000000 --- a/packages/gcc/12.1.0/0005-libsanitizer-mips64-Set-struct_kernel_stat_sz-to-mat.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ac6e15a2776e8fffdbd108213e8690c9f30a7380 Mon Sep 17 00:00:00 2001 -From: Chris Packham -Date: Mon, 16 May 2022 20:55:36 +1200 -Subject: [PATCH] libsanitizer: mips64: Set struct_kernel_stat_sz to match the - kernel - -The kernel's struct stat is 104 bytes when compiling for -_MIPS_SIM_ABI64. Set struct_kernel_stat_sz to match. - -Signed-off-by: Chris Packham -Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105614 ---- - libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h -+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h -@@ -83,7 +83,7 @@ - #elif defined(__mips__) - const unsigned struct_kernel_stat_sz = SANITIZER_ANDROID - ? FIRST_32_SECOND_64(104, 128) -- : FIRST_32_SECOND_64(144, 216); -+ : FIRST_32_SECOND_64(144, 104); - const unsigned struct_kernel_stat64_sz = 104; - #elif defined(__s390__) && !defined(__s390x__) - const unsigned struct_kernel_stat_sz = 64; diff --git a/packages/gcc/12.1.0/0005-sh-Avoid-mb-m1-multilib-combination.patch b/packages/gcc/12.1.0/0005-sh-Avoid-mb-m1-multilib-combination.patch new file mode 100644 index 00000000..981f20db --- /dev/null +++ b/packages/gcc/12.1.0/0005-sh-Avoid-mb-m1-multilib-combination.patch @@ -0,0 +1,64 @@ +From 497bbd01e39ca21091c0e3bb83c83f49319d3cab Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Tue, 17 May 2022 21:36:05 +1200 +Subject: [PATCH] sh: Avoid mb/m1 multilib combination + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105607 + +It's not entirely clear why but the mb/m1 combination fails when +building libgcc. + + gcc/libgcc/config/sh/lib1funcs.S: Assembler messages: + gcc/libgcc/config/sh/lib1funcs.S:933: Error: opcode not valid for this cpu variant + gcc/libgcc/config/sh/lib1funcs.S:935: Error: opcode not valid for this cpu variant + gcc/libgcc/config/sh/lib1funcs.S:942: Error: opcode not valid for this cpu variant + gcc/libgcc/config/sh/lib1funcs.S:944: Error: opcode not valid for this cpu variant + make[4]: *** [Makefile:491: _movmem_i4_s.o] Error 1 + +The assembly that is being complained about is + + 931 L_movmem_loop: + 932 mov.l r3,@(12,r4) + 933 dt r6 + 934 mov.l @r5+,r0 + 935 bt/s L_movmem_2mod4_end + 936 mov.l @r5+,r1 + 937 add #16,r4 + 938 L_movmem_start_even: + 939 mov.l @r5+,r2 + 940 mov.l @r5+,r3 + 941 mov.l r0,@r4 + 942 dt r6 + 943 mov.l r1,@(4,r4) + 944 bf/s L_movmem_loop + 945 mov.l r2,@(8,r4) + 946 rts + 947 mov.l r3,@(12,r4) + +Under GCC11 the combination was not built but somehow under GCC12 it is. +As a workaround add mb/m1 to the list of excluded combinations. + +Signed-off-by: Chris Packham +--- + gcc/config/sh/t-sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/sh/t-sh b/gcc/config/sh/t-sh +index dd5652e11bfb..fa901201e5e6 100644 +--- a/gcc/config/sh/t-sh ++++ b/gcc/config/sh/t-sh +@@ -63,9 +63,9 @@ MULTILIB_MATCHES = $(shell \ + + # SH1 and SH2A support big endian only. + ifeq ($(DEFAULT_ENDIAN),ml) +-MULTILIB_EXCEPTIONS = m1 ml/m1 m2a* ml/m2a* $(TM_MULTILIB_EXCEPTIONS_CONFIG) ++MULTILIB_EXCEPTIONS = m1 ml/m1 mb/m1 m2a* ml/m2a* $(TM_MULTILIB_EXCEPTIONS_CONFIG) + else +-MULTILIB_EXCEPTIONS = ml/m1 ml/m2a* $(TM_MULTILIB_EXCEPTIONS_CONFIG) ++MULTILIB_EXCEPTIONS = ml/m1 mb/m1 ml/m2a* $(TM_MULTILIB_EXCEPTIONS_CONFIG) + endif + + MULTILIB_OSDIRNAMES = \ +-- +2.36.1 + diff --git a/packages/gcc/12.1.0/0006-sh-Avoid-mb-m1-multilib-combination.patch b/packages/gcc/12.1.0/0006-sh-Avoid-mb-m1-multilib-combination.patch deleted file mode 100644 index 981f20db..00000000 --- a/packages/gcc/12.1.0/0006-sh-Avoid-mb-m1-multilib-combination.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 497bbd01e39ca21091c0e3bb83c83f49319d3cab Mon Sep 17 00:00:00 2001 -From: Chris Packham -Date: Tue, 17 May 2022 21:36:05 +1200 -Subject: [PATCH] sh: Avoid mb/m1 multilib combination - -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105607 - -It's not entirely clear why but the mb/m1 combination fails when -building libgcc. - - gcc/libgcc/config/sh/lib1funcs.S: Assembler messages: - gcc/libgcc/config/sh/lib1funcs.S:933: Error: opcode not valid for this cpu variant - gcc/libgcc/config/sh/lib1funcs.S:935: Error: opcode not valid for this cpu variant - gcc/libgcc/config/sh/lib1funcs.S:942: Error: opcode not valid for this cpu variant - gcc/libgcc/config/sh/lib1funcs.S:944: Error: opcode not valid for this cpu variant - make[4]: *** [Makefile:491: _movmem_i4_s.o] Error 1 - -The assembly that is being complained about is - - 931 L_movmem_loop: - 932 mov.l r3,@(12,r4) - 933 dt r6 - 934 mov.l @r5+,r0 - 935 bt/s L_movmem_2mod4_end - 936 mov.l @r5+,r1 - 937 add #16,r4 - 938 L_movmem_start_even: - 939 mov.l @r5+,r2 - 940 mov.l @r5+,r3 - 941 mov.l r0,@r4 - 942 dt r6 - 943 mov.l r1,@(4,r4) - 944 bf/s L_movmem_loop - 945 mov.l r2,@(8,r4) - 946 rts - 947 mov.l r3,@(12,r4) - -Under GCC11 the combination was not built but somehow under GCC12 it is. -As a workaround add mb/m1 to the list of excluded combinations. - -Signed-off-by: Chris Packham ---- - gcc/config/sh/t-sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/gcc/config/sh/t-sh b/gcc/config/sh/t-sh -index dd5652e11bfb..fa901201e5e6 100644 ---- a/gcc/config/sh/t-sh -+++ b/gcc/config/sh/t-sh -@@ -63,9 +63,9 @@ MULTILIB_MATCHES = $(shell \ - - # SH1 and SH2A support big endian only. - ifeq ($(DEFAULT_ENDIAN),ml) --MULTILIB_EXCEPTIONS = m1 ml/m1 m2a* ml/m2a* $(TM_MULTILIB_EXCEPTIONS_CONFIG) -+MULTILIB_EXCEPTIONS = m1 ml/m1 mb/m1 m2a* ml/m2a* $(TM_MULTILIB_EXCEPTIONS_CONFIG) - else --MULTILIB_EXCEPTIONS = ml/m1 ml/m2a* $(TM_MULTILIB_EXCEPTIONS_CONFIG) -+MULTILIB_EXCEPTIONS = ml/m1 mb/m1 ml/m2a* $(TM_MULTILIB_EXCEPTIONS_CONFIG) - endif - - MULTILIB_OSDIRNAMES = \ --- -2.36.1 - -- cgit v1.2.3