# 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)}} \
--many"
+" \
+ASM_CPU_SPU_MANY_NOT_SPE
 
 #define CPP_DEFAULT_SPEC ""
 
