summaryrefslogtreecommitdiff
path: root/debian/patches/powerpc_remove_many.diff
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/powerpc_remove_many.diff')
-rw-r--r--debian/patches/powerpc_remove_many.diff32
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/patches/powerpc_remove_many.diff b/debian/patches/powerpc_remove_many.diff
new file mode 100644
index 0000000..e50df0c
--- /dev/null
+++ b/debian/patches/powerpc_remove_many.diff
@@ -0,0 +1,32 @@
+# DP: Subject: [PATCH] remove -many on __SPE__ target
+# DP: this helps to to detect opcodes which are not part of the current
+# DP: CPU because without -many gas won't touch them. This currently could
+# DP: break the kernel build as the 603 on steroids cpus use performance
+# DP: counter opcodes which are not available on the steroid less 603 core.
+
+--- a/src/gcc/config/rs6000/rs6000.h
++++ b/src/gcc/config/rs6000/rs6000.h
+@@ -98,6 +98,12 @@
+ #define ASM_CPU_476_SPEC "-mpower4"
+ #endif
+
++#ifndef __SPE__
++#define ASM_CPU_SPU_MANY_NOT_SPE "-many"
++#else
++#define ASM_CPU_SPU_MANY_NOT_SPE
++#endif
++
+ /* Common ASM definitions used by ASM_SPEC among the various targets for
+ handling -mcpu=xxx switches. There is a parallel list in driver-rs6000.c to
+ provide the default assembler options if the user uses -mcpu=native, so if
+@@ -170,7 +176,8 @@
+ %{mcpu=e500mc64: -me500mc64} \
+ %{maltivec: -maltivec} \
+ %{mvsx: -mvsx %{!maltivec: -maltivec} %{!mcpu*: %(asm_cpu_power7)}} \
+ %{mpower8-vector|mcrypto|mdirect-move|mhtm: %{!mcpu*: %(asm_cpu_power8)}} \
+--many"
++" \
++ASM_CPU_SPU_MANY_NOT_SPE
+
+ #define CPP_DEFAULT_SPEC ""
+