Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] crosscompiling for NeoGTA2: Unknown arch armv4tl
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
Evil.2000
n00b
n00b


Joined: 08 Jul 2006
Posts: 68
Location: Germany

PostPosted: Sun Feb 28, 2010 2:46 pm    Post subject: [SOLVED] crosscompiling for NeoGTA2: Unknown arch armv4tl Reply with quote

Hello,

i'm trying to cross compile gentoo for my Neo GTA2 by following this guide: http://gentoo.mindzoo.de/index.cgi/wiki/cross-compiling
I'm at the step for building the required gcc:
Code:
crossdev --binutils 2.18-r4 --target armv4tl-softfloat-linux-gnueabi

But it fails with:
Code:
* gcc failed :(
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-armv4tl-softfloat-linux-gnueabi-info.log
 * /var/log/portage/cross-armv4tl-softfloat-linux-gnueabi-gcc-stage1.log
/var/log/portage/cross-armv4tl-softfloat-linux-gnueabi-info.log
/var/log/portage/cross-armv4tl-softfloat-linux-gnueabi-gcc-stage1.log

Its failing at running ./configure for cross-armv4tl-softfloat-linux-gnueabi/gcc-4.2.4-r1:
Code:
Unknown arch used in --with-arch=armv4tl

I tried crossdev with --target armv4tl-softfloat-linux-gnueabi only and i tried with --binutils 2.18-r4 --gcc 4.3.2 --target armv4tl-softfloat-linux-gnueabi but without success.

Does someone know why this fails and how to fix it?

My emerge --info -v :
http://nopaste.info/7509cfecc1.html
_________________
- All is a file. And if not, it should be.


Last edited by Evil.2000 on Mon Mar 01, 2010 10:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
armin76
Retired Dev
Retired Dev


Joined: 24 Apr 2006
Posts: 174

PostPosted: Mon Mar 01, 2010 8:59 pm    Post subject: Reply with quote

Yes, sorry about that.

Please emerge --sync and run the command again.
Back to top
View user's profile Send private message
Evil.2000
n00b
n00b


Joined: 08 Jul 2006
Posts: 68
Location: Germany

PostPosted: Mon Mar 01, 2010 10:30 pm    Post subject: Reply with quote

armin76 wrote:
Yes, sorry about that.

Please emerge --sync and run the command again.


Ok. i synced with
Code:
>>> Starting rsync with rsync://78.46.84.106/gentoo-portage...
>>> Checking server timestamp ...
Welcome to vireo.gentoo.org / rsync.gentoo.org
 
Server Address : 88.198.83.249/29
Contact Name   : mirror-admin@gentoo.org
Hardware       : 2 x AMD Athlon(tm) 64 X2 Dual Core Processor 5600+, 1977MB RAM
and updated portage.

Then i removed the old cross compilation environment
Code:
Deep-Thought ~ # crossdev -C armv4tl-softfloat-linux-gnueabi
 * Uninstalling target 'armv4tl-softfloat-linux-gnueabi' ...
cross-armv4tl-softfloat-linux-gnueabi/binutils: 2.18-r4 none none
>>> Unmerging cross-armv4tl-softfloat-linux-gnueabi/binutils-2.18-r4...
 * GNU info directory index is up-to-date.
cross-armv4tl-softfloat-linux-gnueabi/glibc: 2.11-r1 none none
>>> Unmerging cross-armv4tl-softfloat-linux-gnueabi/glibc-2.11-r1...
 * GNU info directory index is up-to-date.
cross-armv4tl-softfloat-linux-gnueabi/linux-headers: 2.6.32 none none
>>> Unmerging cross-armv4tl-softfloat-linux-gnueabi/linux-headers-2.6.32...
 * GNU info directory index is up-to-date.


And tried again to compile the crossdev environment:
Code:
crossdev --binutils 2.18-r4 --target armv4tl-softfloat-linux-gnueabi


Now it works.
Thank you!

May i ask what caused the error?
_________________
- All is a file. And if not, it should be.
Back to top
View user's profile Send private message
armin76
Retired Dev
Retired Dev


Joined: 24 Apr 2006
Posts: 174

PostPosted: Tue Mar 02, 2010 6:27 pm    Post subject: Reply with quote

Sure,

the problem is that we added '--with-arch' support to gcc, bug 264534. But there was a bug in the code, it was modifying the wrong variable, so the 'l' from armv*l, wasn't being removed.

The --with-arch option, is for not having to use -march= on the CFLAGS. In other words, if your chost is armv7a-unknown-linux-gnueabi, gcc will get compiled with --with-arch=armv7-a. So if you compile something with that gcc, it will be compiled with -march=armv7-a by default. Until now, if you didn't specify any -march, the code got compiled with armv4t optimizations.
Back to top
View user's profile Send private message
billium
Apprentice
Apprentice


Joined: 22 Mar 2003
Posts: 185

PostPosted: Thu Mar 04, 2010 9:22 pm    Post subject: Reply with quote

crossdev -s3 -t arm-none-eabi

fails with the same error

"Unknown arch used in --with-arch=arm"

I have emerged --sync and the pc is on ~x86-64

This worked fine three or four months ago.


If anybody can work out the correct tuple for cortex m3, I would be grateful.

armv7, armv7m, and armv7-m don't work.

Billy
Back to top
View user's profile Send private message
armin76
Retired Dev
Retired Dev


Joined: 24 Apr 2006
Posts: 174

PostPosted: Sat Mar 06, 2010 2:32 pm    Post subject: Reply with quote

How doesn't it work?

I'll fix the arm- thing failure meanwhile...its a case i didn't thought
Back to top
View user's profile Send private message
armin76
Retired Dev
Retired Dev


Joined: 24 Apr 2006
Posts: 174

PostPosted: Sat Mar 06, 2010 4:12 pm    Post subject: Reply with quote

armin76 wrote:

I'll fix the arm- thing failure meanwhile...its a case i didn't thought


Should be fixed now, sync and try
Back to top
View user's profile Send private message
billium
Apprentice
Apprentice


Joined: 22 Mar 2003
Posts: 185

PostPosted: Sat Mar 06, 2010 10:03 pm    Post subject: Reply with quote

Thanks for the speed of your reply.

cross-armv7-m-none-eabi-binutils.log
checking target system type... Invalid configuration `armv7-m-none-eabi': machine `armv7-m-none' not recognized

Is armv7-m-none-eabi the correct tuple for arm cortex m3?
If it is it must be hard to parse. :)

With arm-none-eabi I get this now:

Invalid target 'arm-none-eabi': unknown libc

but gcc is created.

This was discussed on the mailing list in July 09, Martin Gysel wrote:

Quote:
but if I understand crossdev code correctly with this tuple newlib
doesn't get selected (*-newlib|*-elf but not
*-newlib*|*-elf*).
furthermore AFAIK for the compiler the word eabi is important otherwise
arm eabi isn't selected as default. so my suggestion is to use
arm-softfloat-eabi and change crossdev (add |*-eabi just after
*-newlib|*-elf).
another option would probably be to just change *-elf to *-elf* so that
newlib gets selected but in this case I don't know how gcc behaves...
@mike is there a change to have one of these mods added to crossdev
upstream?

/martin


Many thanks again armin76
Billy
Back to top
View user's profile Send private message
armin76
Retired Dev
Retired Dev


Joined: 24 Apr 2006
Posts: 174

PostPosted: Sun Mar 07, 2010 7:12 pm    Post subject: Reply with quote

Well, as you say, that tuple is hard to parse :) You need to use armv7m-..., without the dash between 7 and m. But you need to use -march=armv7-m on the C{,XX}FLAGS.

As for the rest, i'm sorry i can't help you.
Back to top
View user's profile Send private message
Circuitsoft
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jul 2004
Posts: 112

PostPosted: Wed Mar 09, 2011 11:53 pm    Post subject: Reply with quote

armv7m-eabi-elf seems to work if you want no kernel headers and newlib.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum