EmbeddedRelated.com
Forums

armv4l-unkown-linux-gcc compiler problem!!

Started by Chan Ka Cheong January 28, 2005
Hi, I am a newbie in the embedded system world. Currently, I got a
development board with StrongARm 206MHz CPU. I got the vivi and the
cross compiler and prepared to compile a bootloader for my embedded
system, However when I run the "make" command

/opt/host/armv4l/bin/armv4l-unknown-linux-gcc -I/root/cheong/gsl/linuette/vivi/i
nclude -I/opt/host/armv4l/include/ -Wall -Wstrict-prototypes -O2 -fPIC
-fomit-frame-pointer -mapcs-32   -mshort-load-bytes -msoft-float   -c -o
init/main.o init

as: unsupported option `-mapcs-32'
make: *** [init/main.o] Error 1

I refered to the cross-compiler gcc-2.95.2, it should supported the
option '-mapcs-32', so why I got such error?


-- 
Regards,
Edward Chan
Chan Ka Cheong wrote:
> Hi, I am a newbie in the embedded system world. Currently, I got a > development board with StrongARm 206MHz CPU. I got the vivi and the > cross compiler and prepared to compile a bootloader for my embedded > system, However when I run the "make" command > > /opt/host/armv4l/bin/armv4l-unknown-linux-gcc -I/root/cheong/gsl/linuette/vivi/i > nclude -I/opt/host/armv4l/include/ -Wall -Wstrict-prototypes -O2 -fPIC > -fomit-frame-pointer -mapcs-32 -mshort-load-bytes -msoft-float -c -o > init/main.o init > > as: unsupported option `-mapcs-32' > make: *** [init/main.o] Error 1 > > I refered to the cross-compiler gcc-2.95.2, it should supported the > option '-mapcs-32', so why I got such error?
The version 2.95 ARM GCC is obsolete. Get a version 3 GCC. The code generation in 2.95 was a hasty kludge and it contains several problems. IIRC, the code was for apcs-32 anyway. If you're running a Windows host, the generation and setup of GNU cross-tools goes well under Cygwin. Does your bootloader really need floating point (-msoft-float)? The position-independent code option is also a little suspect in this context (-mPIC). -- Tauno Voipio tauno voipio (at) iki fi
Chan Ka Cheong wrote:
> > Hi, I am a newbie in the embedded system world. Currently, I got a > development board with StrongARm 206MHz CPU. I got the vivi and the > cross compiler and prepared to compile a bootloader for my embedded > system, However when I run the "make" command > > /opt/host/armv4l/bin/armv4l-unknown-linux-gcc -I/root/cheong/gsl/li > nuette/vivi/include -I/opt/host/armv4l/include/ -Wall -Wstrict-prot > otypes -O2 -fPIC -fomit-frame-pointer -mapcs-32 -mshort-load-byte > s -msoft-float -c -o init/main.o init > > as: unsupported option `-mapcs-32' > make: *** [init/main.o] Error 1 > > I refered to the cross-compiler gcc-2.95.2, it should supported the > option '-mapcs-32', so why I got such error?
Here "info gcc" says that -mapcs-32 is a replacement for -m6 on older gccs. 2.95 is an awfully old gcc. You might try for a newer gcc, or try using the -m6 option. -- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson
In article <1106896625.861024@jupiter.cse.cuhk.edu.hk>,
Chan Ka Cheong  <kcchan@cse.cuhk.edu.hk> wrote:
>as: unsupported option `-mapcs-32' >make: *** [init/main.o] Error 1
Is it possible that gcc is invoking the wrong assembler? ('as' is the assembler stage.) Try running your compile with the -v option to see. Maybe gcc is trying to use the native assembler instead of the cross-assembler. -- Wim Lewis <wiml@hhhh.org>, Seattle, WA, USA. PGP keyID 27F772C1