OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> With cross-toolchain, how to use non default arch?
lardman
post Apr 8 2004, 03:00 AM
Post #1





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



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
Go to the top of the page
 
+Quote Post
lardman
post Apr 8 2004, 03:15 AM
Post #2





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



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
Go to the top of the page
 
+Quote Post
lardman
post Apr 8 2004, 03:16 AM
Post #3





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



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
Go to the top of the page
 
+Quote Post
lardman
post Apr 8 2004, 04:00 AM
Post #4





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



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
Go to the top of the page
 
+Quote Post
lardman
post Apr 14 2004, 05:11 AM
Post #5





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st August 2014 - 06:05 AM