Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] SH-4 cross-compile troubles
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
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 442

PostPosted: Wed Jul 11, 2007 7:17 am    Post subject: [SOLVED] SH-4 cross-compile troubles Reply with quote

Hello,

For a few days now I'm experiencing the following problem:
Every single app, cross-compiled on a PC (i686) host for SH4, segfaults
when started on the target. Compiled on the target itself, everything works fine.

The host PC uses binutils-2.17, gcc-4.1.2. glibc-2.5-r3 (against linux-headers-2.6.21), built with crossdev on 10-july-2007;
the SH4 target uses binutils-2.17 (built 09-july-2007), gcc-4.1.2 (built 29-march-2007) and glibc-2.5-r3 (built 26-june-2007, against linux-headers-2.6.20)

as far as I can tell, segfault occurs way before main() is called.

I already downgraded the cross-compiler to gcc-4.1.1, glibc-2.5-r2, linux-headers-2.6.20 (this combo worked very well previously), to no avail.
Compiler seems alright as the kernels and bootloaders compiled with it run fine.

Any ideas how to track this down?

Thanks,
-- mano


Last edited by roarinelk on Sat Oct 13, 2007 7:55 am; edited 1 time in total
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 442

PostPosted: Tue Jul 17, 2007 5:29 am    Post subject: Reply with quote

A bit more:

I upgraded the target from glibc-2.5-r3 to glibc-2.5-r4, and now all it produces are segfaulting binaries.
I also found an "old" version of cross-sh4 glibc-2.5[-r0] and all newly cross compiled apps are running again.
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 442

PostPosted: Sat Oct 13, 2007 7:54 am    Post subject: Reply with quote

Update (if anyone cares for SH-4)
With GCC-4.2.1/4.2.2, binutils-2.18-r1 and glibc-2.6.1 the issues are all gone.
Both the cross and the native compilers are working fine now.

EDIT: however there's still a strange bug in binutils > 2.17.50.0.x (with 8<=x<=17)
which generates a 2GB intermediate kernel file (vmlinux.bin) while building the final zImage.
binutils-2.17 is fine too..
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