OESF Portables Forum

Everything Else => Zaurus - Everything Development => Distros, Development, and Model Specific Forums => Archived Forums => Linux Applications => Topic started by: lardman on April 08, 2004, 07:00:40 am

Title: With cross-toolchain, how to use non default arch?
Post by: lardman on April 08, 2004, 07:00:40 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,


Simon
Title: With cross-toolchain, how to use non default arch?
Post by: lardman on April 08, 2004, 07:15:18 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)?


Simon
Title: With cross-toolchain, how to use non default arch?
Post by: lardman on April 08, 2004, 07:16:04 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.

Si
Title: With cross-toolchain, how to use non default arch?
Post by: lardman on April 08, 2004, 08:00:47 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.


Si

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
Title: With cross-toolchain, how to use non default arch?
Post by: lardman on April 14, 2004, 09:11:40 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.


Si