Apr 8 2004, 03:00 AM
Basically I'd like to generate some ARM4 (for the 5500 owners out there) binaries using the pdaXrom toolchain.
By default the pdaXrom toolchain generates ARM5 (XScale) code. I'm pretty sure it can also generate ARM4 code, though I'm not sure. I did gcc --dumpspecs and can see lots of different processor types in there (including the one I want), does this mean it can produce what I want?
Now I realise that I need to use the -m switch (-march=arm4 or -march=strongarm1100 should do the trick), but the question is where do I use these? I presume they should be passed as arguments to gcc? and to c++? and g77? Is this right?
The other issue is how to get this to work when using ./configure? I suppose I could add it to BUILDCFLAGS and BUILDCXXFLAGS, anyone have any better suggestions?
Sorry for all the questions, cheers,
Apr 8 2004, 03:15 AM
Right I'm trying with something along the lines of:
BUILD_CFLAGS=-march=strongarm1100 BUILD_CXXFLAGS=-march=strongarm1100 ./configure --host=arm-linux
There is no option for a BUILDFFLAGS (FORTRAN build flags) and if I specify FFLAGS as I've done above for BUILDCFLAGS the configure process falls over. I had a quick look at the g77 man page and it would appear that it's not possible to pass -m to g77 (which explains why it falls over).
My question is what does the g77 compiler produce (if it can't be tuned for different architectures)?
Apr 8 2004, 03:16 AM
Doesn't look like it worked - at least the end of the configure process has no trace of the flags I asked it to include.
I'll start make and see whether it runs on the other end.
Apr 8 2004, 04:00 AM
Looks like -march doesn't work with the pdaXrom toolchain, but -mcpu=atrongarm1100 does work (at least it gets passed through configure), it's compiling now so we'll see whether this method will work.
P.S. I eventually went for the all encompassing command line:
BUILD_CFLAGS="-mcpu=strongarm1100" CFLAGS="-mcpu=strongarm1100" BUILD_CXXFLAGS="-mcpu=strongarm1100" CXXFLAGS="-mcpu=strongarm1100" ./configure --host=arm-linux
Apr 14 2004, 05:11 AM
Oh and you can pass it to G77 too (after looking on the interweb, etc.), I was wrong to believe that if it's not in the the man page it doesn't exist, so it ends up as:
BUILD_CFLAGS="-mcpu=strongarm1100" CFLAGS="-mcpu=strongarm1100" BUILD_CXXFLAGS="-mcpu=strongarm1100" CXXFLAGS="-mcpu=strongarm1100" FFLAGS="-mcpu=strongarm1100" ./configure --host=arm-linux
Don't know whether it generates ARM4 code yet though, I'll test it this evening.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here