public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* ppc assembler problem
@ 2005-08-15 12:42 F. Heitkamp
  2005-08-16 18:02 ` James E Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: F. Heitkamp @ 2005-08-15 12:42 UTC (permalink / raw)
  To: gcc


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ppc assembler problem
  2005-08-15 12:42 ppc assembler problem F. Heitkamp
@ 2005-08-16 18:02 ` James E Wilson
  2005-08-17 12:05   ` F. Heitkamp
  0 siblings, 1 reply; 6+ messages in thread
From: James E Wilson @ 2005-08-16 18:02 UTC (permalink / raw)
  To: heitkamp; +Cc: gcc

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
appears that it isn't completely compatible with how you've configured
your gcc, since it isn't accepting altivec instructions by default.  I
don't know offhand whether this is a gcc problem or a binutils problem.
 gcc-3.3 is getting pretty old, and isn't maintained anymore.

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.
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ppc assembler problem
  2005-08-16 18:02 ` James E Wilson
@ 2005-08-17 12:05   ` F. Heitkamp
  2005-08-17 12:16     ` Williams Jr, Ernest L.
  2005-08-17 19:33     ` James E Wilson
  0 siblings, 2 replies; 6+ messages in thread
From: F. Heitkamp @ 2005-08-17 12:05 UTC (permalink / raw)
  To: James E Wilson; +Cc: gcc

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: ppc assembler problem
  2005-08-17 12:05   ` F. Heitkamp
@ 2005-08-17 12:16     ` Williams Jr, Ernest L.
  2005-08-17 19:33     ` James E Wilson
  1 sibling, 0 replies; 6+ messages in thread
From: Williams Jr, Ernest L. @ 2005-08-17 12:16 UTC (permalink / raw)
  To: heitkamp, James E Wilson; +Cc: gcc




-----Original Message-----
From: gcc-owner@gcc.gnu.org on behalf of F. Heitkamp
Sent: Wed 8/17/2005 8:05 AM
To: James E Wilson
Cc: gcc@gcc.gnu.org
Subject: Re: ppc assembler problem
 
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.

<****   ernesto  ******************>
Also, try the crossgcc mailing list
<******* ernesto ******************>




> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ppc assembler problem
  2005-08-17 12:05   ` F. Heitkamp
  2005-08-17 12:16     ` Williams Jr, Ernest L.
@ 2005-08-17 19:33     ` James E Wilson
  2005-08-18  7:35       ` Gunther Nikl
  1 sibling, 1 reply; 6+ messages in thread
From: James E Wilson @ 2005-08-17 19:33 UTC (permalink / raw)
  To: heitkamp; +Cc: gcc

F. Heitkamp wrote:
> 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?

Perhaps this is a case that gcc doesn't handle right.  When you use the
-m7400 option, gcc will pass -maltivec to the assembler.  When you use
--with-cpu=7400 at configure time, gcc should pass -maltivec to the
assembler by default.  This is apparently not happening, and is probably
a gcc bug.  ASM_SPEC would have to be modified to fix this.  You may be
able to do this manually by creating a spec file and editing it to add
the missing -maltivec option to the assembler specs.

You may want to report this problem into the gcc bugzilla database so it
gets tracked and fixed.
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ppc assembler problem
  2005-08-17 19:33     ` James E Wilson
@ 2005-08-18  7:35       ` Gunther Nikl
  0 siblings, 0 replies; 6+ messages in thread
From: Gunther Nikl @ 2005-08-18  7:35 UTC (permalink / raw)
  To: James E Wilson; +Cc: heitkamp, gcc

On Wed, Aug 17, 2005 at 12:33:12PM -0700, James E Wilson wrote:
> F. Heitkamp wrote:
> > 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?
> 
> Perhaps this is a case that gcc doesn't handle right.  When you use the
> -m7400 option, gcc will pass -maltivec to the assembler.

  3.3.6 doesn't.

> When you use --with-cpu=7400 at configure time, gcc should pass -maltivec
> to the assembler by default.

  AFAICS, --with-cpu does only set the default CPU for the compiler.

> This is apparently not happening, and is probably a gcc bug.  ASM_SPEC
> would have to be modified to fix this.  You may be able to do this
> manually by creating a spec file and editing it to add the missing
> -maltivec option to the assembler specs.

  He should provide a suitable ASM_DEFAULT_SPEC for his port and modify
  the mcpu=7400 part of rs6000/rs6000.h/ASM_CPU_SPEC.

> You may want to report this problem into the gcc bugzilla database so it
> gets tracked and fixed.

  Well, 3.3.6 is a dead branch. 3.4.x and later have a proper ASM_CPU_SPEC.

  Gunther

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-08-18  7:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-15 12:42 ppc assembler problem F. Heitkamp
2005-08-16 18:02 ` James E Wilson
2005-08-17 12:05   ` F. Heitkamp
2005-08-17 12:16     ` Williams Jr, Ernest L.
2005-08-17 19:33     ` James E Wilson
2005-08-18  7:35       ` Gunther Nikl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).