ppc assembler problem

2005-08-15 Thread F. Heitkamp


I'm trying to compile gcc-3.3.6 on powerpc. I am having a heck of a time 
getting rid of the following problem.  I've tried several combinations of 
*FLAGS as well as passing ASFLAGS.  What is the sure fire way to pass 
flags to the assembler when compiling GCC?


 if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/drives/work/src/gcc-bin/gcc/xgcc -B/drives/work/src/gcc-bin/gcc/ 
-B/exports/gcc33x/powerpc-unknown-linux-gnu/bin/ 
-B/exports/gcc33x/powerpc-unknown-linux-gnu/lib/ -isystem 
/exports/gcc33x/powerpc-unknown-linux-gnu/include -O2  -DIN_GCC -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem 
./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 
-D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../gcc-cvs-3-3/gcc//gcc 
-I../../gcc-cvs-3-3/gcc//gcc/. -I../../gcc-cvs-3-3/gcc//gcc/config 
-I../../gcc-cvs-3-3/gcc//gcc/../include -fexceptions -c 
../../gcc-cvs-3-3/gcc//gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o

/tmp/ccNkOiHW.s: Assembler messages:
/tmp/ccNkOiHW.s:3142: Error: Unrecognized opcode: `stvx'
/tmp/ccNkOiHW.s:3145: Error: Unrecognized opcode: `stvx'
/tmp/ccNkOiHW.s:3148: Error: Unrecognized opcode: `stvx'
/tmp/ccNkOiHW.s:3151: Error: Unrecognized opcode: `stvx'
/tmp/ccNkOiHW.s:3154: Error: Unrecognized opcode: `stvx'
/tmp/ccNkOiHW.s:3157: Error: Unrecognized opcode: `stvx'
/tmp/ccNkOiHW.s:3160: Error: Unrecognized opcode: `stvx'
/tmp/ccNkOiHW.s:3163: Error: Unrecognized opcode: `stvx'
/tmp/ccNkOiHW.s:3166: Error: Unrecognized opcode: `stvx'
/tmp/ccNkOiHW.s:3169: Error: Unrecognized opcode: `stvx'
/tmp/ccNkOiHW.s:3172: Error: Unrecognized opcode: `stvx'
/tmp/ccNkOiHW.s:3175: Error: Unrecognized opcode: `stvx'
/tmp/ccNkOiHW.s:3177: Error: Unrecognized opcode: `mfvrsave'
/tmp/ccNkOiHW.s:3181: Error: Unrecognized opcode: `mtvrsave'


My configure:
../gcc-cvs-3-3/gcc//configure 
--with-gcc-version-trigger=/drives/work/src/gcc-cvs-3-3/gcc/gcc/version.c 
--host=powerpc-unknown-linux-gnu --prefix=/exports/gcc33x 
--disable-multilib --with-gcc --with-gnu-ld --with-gnu-as --enable-libada 
--enable-libgcj --enable-interpreter --enable-hash-synchronization 
--enable-shared --enable-clocale=gnu --with-cpu=7400 --enable-altivec 
--with-tls --with-nptl --enable-languages=all --with-libada 
--with-libbanshee --with-gmp --enable-version-specific-runtime-libs 
--enable-__cxa_atexit --enable-libbanshee --enable-libada --norecursion


My make command:
TUNE="-mtune=7400 -mcpu=7400 -maltivec -Wa,-m7400"

make BOOT_CFLAGS="$TUNE -O2 -DWERROR=-Wno-error -pipe" 
CFLAGS_FOR_TARGET="$TUNE -O2"  CXXFLAGS_FOR_TARGET="-O2"   ASFLAGS="-m7400"



Fred


Re: ppc assembler problem

2005-08-17 Thread F. Heitkamp

On Tue, 16 Aug 2005, James E Wilson wrote:


F. Heitkamp wrote:

../../gcc-cvs-3-3/gcc//gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
/tmp/ccNkOiHW.s: Assembler messages:
/tmp/ccNkOiHW.s:3142: Error: Unrecognized opcode: `stvx'


You didn't mention the binutils version or how it was configured.  It


GNU assembler 2.16.91 20050809

Bintutils used the same configure script as what I used for gcc.

I've been reading (googling) up on this problem as it seems I am not the 
first to have it.  The problem also seems quite complicated.


Binutils was configured with (among other options) "--with-cpu=7400" and 
"--enable-altivec".  It can and does compile altivec instructions fine. 
It's just I can't get gcc and xgcc to pass that to the assembler.  I 
thought the "--with-cpu" option was supposed to do that? i.e. default to a 
particular cpu. Looking at the specs file for the host compiler the 
default is -mppc.  When I gave the "--with-cpu=7400" shouldn't that have 
made the default  -m7400?.   What about xgcc, how can I make that use the 
7400 cpu?


Maybe I'll also ask folks on the binutils mailing list.


There is a TARGET_LIBGCC2_CFLAGS that is used when compiling libgcc2
instead of the normal CFLAGS_FOR_TARGET.  You could add extra -m options
here.  That would solve your immediate problem, but you still would have
a mismatch between gcc and binutils.


It didn't work for me but I could have something else preventing it from 
working.


Fred