When compiling for some specific powerpc targets (405 for instance, but for 403
is also true) the -many flag causes problems. This is added when your compiler
command is something like:
powerpc-eabi-gcc -c -finline-limit=7000 -msoft-float -mcpu=405 -Wall
-Wpointer-arith -Wstrict-prototypes -Winline -Wundef -g -O2
-ffunction-sections -fdata-sections -fno-exceptions -Wp,-MD,... -o ...
the real problem is that -many produces assembly codes that must be valid for
all ppc targets, so if you have some inline assembly included when as is
included it tries to compile the inline assembly (which is specific in my case
to 405) and it complains about not being a valid opcode. The solution to this
problem is to remove the -many flag. Below is a simple patch against 3.4.3 that
fixes this.
diff -uNr gcc-3.4.3/gcc/config/rs6000/rs6000.h
gcc-3.4.3-patched/gcc/config/rs6000/rs6000.h
--- gcc-3.4.3/gcc/config/rs6000/rs6000.h 2004-08-23 20:02:58.000000000
+0200
+++ gcc-3.4.3-patched/gcc/config/rs6000/rs6000.h 2005-04-18
19:49:31.000000000 +0200
@@ -97,8 +97,7 @@
%{mcpu=970: -mpower4 -maltivec} \
%{mcpu=G5: -mpower4 -maltivec} \
%{mcpu=8540: -me500} \
-%{maltivec: -maltivec} \
--many"
+%{maltivec: -maltivec}"
--
Summary: -many flag causes problems
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: carlos at mind dot be
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: powerpc-eabi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21091