This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Failure to boot into cross built environment (iWMMXt NPTL EABI)


On Sunday 23 April 2006 23:52, Steven Newbury wrote:
> --- Mike Frysinger <vapier@gentoo.org> wrote:
> > On Sunday 23 April 2006 20:08, Steven Newbury wrote:
> > > Since I've got
> > > you attention I'd like to ask a question about the gcc ebuild; when a
> > > cross-<target>/gcc is installed the gcc library path gets added via
> > > LDPATH to the env.d -> ld.so.conf, this puts incompatible libraries in
> > > the library search path which causes dynamic linking to then fail for
> > > native programs that find the alien library before the native one they
> > > seek. I assume this is not intended!  I made the LDPATH addition
> > > conditional on is_crosscompile and CHOST != CTARGET, is that OK?
> >
> > gcc-config already handles this by not inserting stuff into ld.so.conf
> > when selecting a cross-compiler ... so having LDPATH declared
> > in /etc/env.d/gcc/CTARGET-VERSION isnt a bug
>
> Or rather that isn't where the bug is/was! I was getting non-native paths
> in ld.so.conf.  Hmm.

make sure you have the latest gcc-config ... ive fixed up cross-compiling 
logic in there a lot over time ... but i have about ~25 cross-compilers 
installed on my machine and havent had their non-native paths leak into my 
ld.so.conf ...

> Yes, this is very true, though I did for a reason.  I use the ebuild for
> building the cross-compiler as well as the native compiler and it seemed
> the only way to get the CFLAGS respected by the build process.

for setting up the cross-compiler there is a helper 'crossdev' script which 
takes care of all the mundane details ...
# emerge crossdev
# crossdev arm-iwmmxt-linux-gnueabi

the trick for cross-compiling into ROOT is to setup a wrapper:
$ cat cmerge
#!/bin/bash
export ROOT=/mnt/arm-eabi
export CFLAGS="-Os -march=iwmmxt ......"
.....
exec emerge "$@"
$ cmerge sys-libs/glibc
-mike

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]