aboutsummaryrefslogtreecommitdiffstats
path: root/musl/patches-in-mcm/gcc-12.2.0
diff options
context:
space:
mode:
Diffstat (limited to 'musl/patches-in-mcm/gcc-12.2.0')
-rw-r--r--musl/patches-in-mcm/gcc-12.2.0/0000-nostdinc.diff26
-rw-r--r--musl/patches-in-mcm/gcc-12.2.0/0002-posix_memalign.diff30
-rw-r--r--musl/patches-in-mcm/gcc-12.2.0/0005-m68k-sqrt.diff20
-rw-r--r--musl/patches-in-mcm/gcc-12.2.0/0006-s390x-no-multilib.diff12
4 files changed, 88 insertions, 0 deletions
diff --git a/musl/patches-in-mcm/gcc-12.2.0/0000-nostdinc.diff b/musl/patches-in-mcm/gcc-12.2.0/0000-nostdinc.diff
new file mode 100644
index 0000000..f1ec338
--- /dev/null
+++ b/musl/patches-in-mcm/gcc-12.2.0/0000-nostdinc.diff
@@ -0,0 +1,26 @@
+diff --git a/configure b/configure
+index 6157a8c87fb..2a4a05b4edf 100755
+--- a/configure
++++ b/configure
+@@ -16653,7 +16653,7 @@ else
+ fi
+
+
+-RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
++RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET -nostdinc++"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ar" >&5
+ $as_echo_n "checking where to find the target ar... " >&6; }
+diff --git a/configure.ac b/configure.ac
+index 2ff48941754..01ecc8c42d9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3515,7 +3515,7 @@ ACX_CHECK_INSTALLED_TARGET_TOOL(STRIP_FOR_TARGET, strip)
+ ACX_CHECK_INSTALLED_TARGET_TOOL(WINDRES_FOR_TARGET, windres)
+ ACX_CHECK_INSTALLED_TARGET_TOOL(WINDMC_FOR_TARGET, windmc)
+
+-RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
++RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET -nostdinc++"
+
+ GCC_TARGET_TOOL(ar, AR_FOR_TARGET, AR, [binutils/ar])
+ GCC_TARGET_TOOL(as, AS_FOR_TARGET, AS, [gas/as-new])
diff --git a/musl/patches-in-mcm/gcc-12.2.0/0002-posix_memalign.diff b/musl/patches-in-mcm/gcc-12.2.0/0002-posix_memalign.diff
new file mode 100644
index 0000000..1d80096
--- /dev/null
+++ b/musl/patches-in-mcm/gcc-12.2.0/0002-posix_memalign.diff
@@ -0,0 +1,30 @@
+diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
+index 1b0bfe37852..d7b2b19bb3c 100644
+--- a/gcc/config/i386/pmm_malloc.h
++++ b/gcc/config/i386/pmm_malloc.h
+@@ -27,12 +27,13 @@
+ #include <stdlib.h>
+
+ /* We can't depend on <stdlib.h> since the prototype of posix_memalign
+- may not be visible. */
++ may not be visible and we can't pollute the namespace either. */
+ #ifndef __cplusplus
+-extern int posix_memalign (void **, size_t, size_t);
++extern int _mm_posix_memalign (void **, size_t, size_t)
+ #else
+-extern "C" int posix_memalign (void **, size_t, size_t) throw ();
++extern "C" int _mm_posix_memalign (void **, size_t, size_t) throw ()
+ #endif
++__asm__("posix_memalign");
+
+ static __inline void *
+ _mm_malloc (size_t __size, size_t __alignment)
+@@ -42,7 +43,7 @@ _mm_malloc (size_t __size, size_t __alignment)
+ return malloc (__size);
+ if (__alignment == 2 || (sizeof (void *) == 8 && __alignment == 4))
+ __alignment = sizeof (void *);
+- if (posix_memalign (&__ptr, __alignment, __size) == 0)
++ if (_mm_posix_memalign (&__ptr, __alignment, __size) == 0)
+ return __ptr;
+ else
+ return NULL;
diff --git a/musl/patches-in-mcm/gcc-12.2.0/0005-m68k-sqrt.diff b/musl/patches-in-mcm/gcc-12.2.0/0005-m68k-sqrt.diff
new file mode 100644
index 0000000..652efb1
--- /dev/null
+++ b/musl/patches-in-mcm/gcc-12.2.0/0005-m68k-sqrt.diff
@@ -0,0 +1,20 @@
+diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md
+index 59a456cd496..dbfddea41bd 100644
+--- a/gcc/config/m68k/m68k.md
++++ b/gcc/config/m68k/m68k.md
+@@ -4174,13 +4174,13 @@
+ (define_expand "sqrt<mode>2"
+ [(set (match_operand:FP 0 "nonimmediate_operand" "")
+ (sqrt:FP (match_operand:FP 1 "general_operand" "")))]
+- "TARGET_HARD_FLOAT"
++ "(TARGET_68881 && TARGET_68040) || TARGET_COLDFIRE_FPU"
+ "")
+
+ (define_insn "sqrt<mode>2_68881"
+ [(set (match_operand:FP 0 "nonimmediate_operand" "=f")
+ (sqrt:FP (match_operand:FP 1 "general_operand" "f<FP:dreg>m")))]
+- "TARGET_68881"
++ "TARGET_68881 && TARGET_68040"
+ {
+ if (FP_REG_P (operands[1]))
+ return "f<FP:round>sqrt%.x %1,%0";
diff --git a/musl/patches-in-mcm/gcc-12.2.0/0006-s390x-no-multilib.diff b/musl/patches-in-mcm/gcc-12.2.0/0006-s390x-no-multilib.diff
new file mode 100644
index 0000000..852deb7
--- /dev/null
+++ b/musl/patches-in-mcm/gcc-12.2.0/0006-s390x-no-multilib.diff
@@ -0,0 +1,12 @@
+diff --git a/gcc/config/s390/t-linux64 b/gcc/config/s390/t-linux64
+index cc6ab367072..7f498ee1cdc 100644
+--- a/gcc/config/s390/t-linux64
++++ b/gcc/config/s390/t-linux64
+@@ -7,5 +7,5 @@
+
+ MULTILIB_OPTIONS = m64/m31
+ MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu)
+-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
++MULTILIB_OSDIRNAMES = m64=../lib
++MULTILIB_OSDIRNAMES+= m32=../lib32