Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
crossdev - toolchain for a powerpc system running linux 2.4
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
smichak
n00b
n00b


Joined: 08 Feb 2008
Posts: 2

PostPosted: Fri Jun 26, 2009 10:49 am    Post subject: crossdev - toolchain for a powerpc system running linux 2.4 Reply with quote

Hi,

I'm trying to build a stage 3 cross toolchain for a linux 2.4.21 system running on a powerpc platform. Upgrading the target system's kernel is impossible.

So far all my attempts to create a toolchain with various versions of gcc and libc using crossdev have failed with build errors (different errors for different gcc/libc versions).

If anyone has ever been successful in this and can provide me with the versions he's using and the method to get this working I would be really grateful.


Thanks,

Micha
Back to top
View user's profile Send private message
SnakeByte
Apprentice
Apprentice


Joined: 04 Oct 2002
Posts: 177
Location: Europe - Germany

PostPosted: Sat Aug 15, 2009 6:46 pm    Post subject: Reply with quote

Hi,

just wrapping up through all the cross-compile posts ...

Building a basic kernel 2.4 toolchain should work
if you consider the following restrictions according to [1]:

vanilla kernel 2.4 does not support nptl
glibc >= 2.4 requires nptl and kernel 2.6
old glibc <= 2.7 can not build with gcc >= 4.3


so after some experiments the full ( incl. c++ ) toolchain builds with
Code:
USE="-nptl -nptlonly" nice crossdev --target powerpc-unknown-linux-gnu --g 3.4.6-r2 --b 2.18-r4 --k 2.4.37 --l 2.3.6-r5 --without-headers


After this it is possible to build and use a more recent gcc and binutils too.

[edit] To get a glibc for an older kernel release you need to get an ebuild for it and change the --l variable for crossdev.


Code:

gcc-config -l

powerpc-unknown-linux-gnu-3.4.6
powerpc-unknown-linux-gnu-3.4.6-hardened
powerpc-unknown-linux-gnu-3.4.6-hardenednopie
powerpc-unknown-linux-gnu-3.4.6-hardenednopiessp
powerpc-unknown-linux-gnu-3.4.6-hardenednossp
powerpc-unknown-linux-gnu-4.1.2
powerpc-unknown-linux-gnu-4.2.4
powerpc-unknown-linux-gnu-4.3.2
powerpc-unknown-linux-gnu-4.4.1 *



And using emerge-wrappers cross building seems to work, although the make.conf file
in the powerpc root dir needs updates for the ARCH variables.

Code:

emerge-powerpc-unknown-linux-gnu /usr/portage/app-misc/beep/beep-1.2.2-r1.ebuild

file /usr/powerpc-unknown-linux-gnu/usr/bin/beep

/usr/powerpc-unknown-linux-gnu/usr/bin/beep: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), stripped




regards


[1] http://devpit.org/wiki/Gnu_Toolchain/Compatibility_Matrix


PS: somebody put this in the cross-compile wiki ;-)
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