This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: no-altivec assembler option


Hi Dan,
I just found out that the cross compiler was not built with the
"disable-altivec" flag, although it should not be because the hardware
doesnt have an altivec unit. I am facing this problem when I am trying to
cross compile valgrind for ppc750. There is an experimental valgrind by Paul
Mackerras available on http://valgrind.kde.org/related.html. I first tried
compiling it with a cross compiler which was built using bin utils 2.11 and
I found out that did not support the maltivec / mno-altivec options. So I
switched to a cross compiler with a more recent binutils (2.15). The
valgrind Makefile has this altivec option set. Actually with the -maltivec
flag it compiles and I am able to run valgrind on the target hardware.
However, some of the valgrind tools (addrcheck) are giving seg fault. So I
was thinking if it was anything to do with giving the -maltivec option when
the target hadware doesnt have the unit.  I am attaching the Makefile.in
file. Have u ever played around with this valgrind package ? 

The output with -v is as follows: 
/opt/cegl-2.0/powerpc-750-linux-gnu/gcc-3.3.3-glibc-2.3.2/bin/powerpc-750-li
nux-gnu-gcc -v
Reading specs from
/opt/cegl-2.0/powerpc-750-linux-gnu/gcc-3.3.3-glibc-2.3.2/lib/gcc-lib/powerp
c-750-linux-gnu/3.3.3/specs
Configured with:
/home/ankur/cegl-2.0-6/crosstool-0.28-rc28/build/powerpc-750-linux-gnu/gcc-3
.3.3-glibc-2.3.2/gcc-3.3.3/configure --target=powerpc-750-linux-gnu
--host=i686-host_pc-linux-gnu
--prefix=/opt/cegl-2.0/powerpc-750-linux-gnu/gcc-3.3.3-glibc-2.3.2
--with-cpu=750 --enable-cxx-flags=-mcpu=750
--with-headers=/opt/cegl-2.0/powerpc-750-linux-gnu/gcc-3.3.3-glibc-2.3.2/pow
erpc-750-linux-gnu/include
--with-local-prefix=/opt/cegl-2.0/powerpc-750-linux-gnu/gcc-3.3.3-glibc-2.3.
2/powerpc-750-linux-gnu --disable-nls --enable-threads=posix
--enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++
--enable-shared --enable-c99 --enable-long-long
Thread model: posix
gcc version 3.3.3

It fails when it tries to compile an assembly file. The error is as follows:

/opt/cegl-2.0/powerpc-750-linux-gnu/gcc-3.3.3-glibc-2.3.2/bin/powerpc-750-li
nux-gnu-gcc -I./demangle -I../include -I../include -I.  -I..  -I./powerpc -
I./powerpc-linux -Wa,-mno-altivec  -c -o vg_ppc_helpers.o `test -f
'powerpc/vg_ppc_helpers.S' || echo './'`powerpc/vg_ppc_helpers.S
Assembler messages:
Error: invalid switch -mno-altivec
make[4]: *** [vg_ppc_helpers.o] Error 1

Hope this makes sense!!! 

Thanks,
Rohan

-----Original Message-----
From: Daniel Kegel [mailto:dank@kegel.com]
Sent: Monday, October 04, 2004 2:47 PM
To: Rohan Chitradurga
Cc: 'crossgcc@sources.redhat.com'
Subject: Re: no-altivec assembler option


Rohan Chitradurga wrote:
> I am trying to cross compile an application for a ppc750 using a tool
chain
> that uses gcc 3.3.3, glibc 2.3.2 and bin utils 2.15. Passing "-Wa,
> -maltivec" to the compiler works and the application compiles but passing
> "-Wa,-mno-altivec" doesnt.  I get a assembler error "invalid switch,
> -mno-altivec". My target hardware doesnt have a altivec unit though. Can
> anyone tell me why the assembler will accept one option but not the other
?
> Not specifying any assembler option results in errors "invalid opcode
stvx,
> mtvrsave, mfvrsave etc". 

Hi Rohan!
You don't want an assembler option, you want a compiler
option, otherwise the compiler will send altivec code
to the assembler, and no assembler option can save you then.
Actually, if your cross-compiler was specifically built to
target the ppc750 by default, you shouldn't need to give any options at all.

Can you give more details, e.g.
What does the cross-compiler output when you run it with just the -v option?
What's the smallest program this problem occurs for?
How was the cross-compiler built?

Cheers,
Dan

Attachment: Makefile.in
Description: Binary data

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]