Gentoo Archives: gentoo-embedded

From: "Dennis.Yxun" <dennis.yxun@×××××.com>
To: gentoo-embedded@l.g.o
Subject: [gentoo-embedded] Trying to Make Cross compile more firendly
Date: Thu, 26 Mar 2009 14:59:10
1 HI Community:
2 I'm trying to cross compile a stage1 base system for Openpandora. All the
3 steps can be followed in this wiki [1].
4 I prefer to take cross compile way,because I think it's more considerable
5 for embedded development. Since not all the embedded devices
6 are that powerful as TI's OMAP3 chip. Gentoo-openpandora-dev already took
7 the native way to compile out most packages : ) Great!
8 Actually the upstream provide two scripts [2] to setup the building
9 environment. Which one is, it set SYSROOT same
10 with ROOT, another is, which make ROOT different from
11 SYSROOT. Since SYSROOT is the cross
12 toolchain's environment, and ROOT is the target rootfs. I perfer to take
13's way, It would seperate toolchains and target
14 rootfs. So it will make the finanal rootfs more neat and clean, also will
15 avoid potential file confliction. That could be possible, for example
16 the linux-headers, both cross toolchain and target rootfs will emerge. Also
17 maybe simply mark it as provided would solve this problem.
18 The upstream's default embedded's make.conf only look for header files
19 and library from ROOT's path. So if some lowlevel package
20 looking for header file or library located at the toolchain's path, will
21 fail at complile stage. I come cross and idea, maybe it's possible to add
22 both SYSROOT and ROOT's path into compiler's looking path.So I just tweaked
23 the CFLAGS and LDFLAGS[3]. I have no idea whill there be
24 any problem with this. Still struggling and so far I got here.
25 Any idea about how to make embedded people's life easy would be great.
26 We may share the same problem. So I put the thread here, hope can drag
27 people's attention
29 Best Regards
31 Dennis 'Openfree' Yxun
33 [1]
35 [2]
37 [3] LDFLAGS=" -L${ROOT}/lib -L/${ROOT}/usr/lib \
38 -L${SYSROOT}usr/lib -L${SYSROOT}lib \
39 "
40 CFLAGS="-Os -pipe ${MARCH_TUNE} -fomit-frame-pointer \
41 -I${SYSROOT}/usr/include \
42 -I${SYSROOT}/include \
43 -I${ROOT}usr/include/ \
44 -I${ROOT}include/ \
45 "


Subject Author
Re: [gentoo-embedded] Trying to Make Cross compile more firendly Sven Rebhan <odinshorse@××××××××××.com>
Re: [gentoo-embedded] Trying to Make Cross compile more firendly Patrice Tisserand <ptisserand@××××××.com>