Cross linking our Ch5 build against a new glibc

Ryan.Oliver at pha.com.au Ryan.Oliver at pha.com.au
Sun Jan 19 21:18:24 PST 2003


> It seems to me that we don't really need a cross linker. I know that
you've
> based your stuff on Bruno Haible's post but from what I can tell, the
> current tools just work! gcc-3.2.1 (installed into /static) seems to be
> smart enuff to drag in everything (except for the dynamic linker
directive)
> from /static

I wonder if this is due to our defining --with-ld which points at an ld
created with prefix=/static ...
Interesting, though it does make sense for the tools to search
$prefixdir/lib
before the system libs... I just didn't think they did...

> Note also the include search order, which although it searches
> /usr/local/include first, it then searches /static/include which is what
we
> want. I'm not sure if searching /usr/local/include first could be harmful
or
> not.

Hmmph, we really dont want to be looking in /usr/local/include first
( unless of course it is empty... ), really don't want to drag anything in
from the host system

I must admit to still liking the setting of LIB_PATH = /static/lib for
binutils, this way at no point will ld look in the standard system lib
dirs. Therefore builds will break if the required library isn't in
/static/lib, showing you that you have a problem with your build order.
Otherwise it is quite possible to have ld trying to link against the system
libs, something I dont particularly want ( doing all my builds from a glibc
 2.2.5 system )

> All I did was tweak
> the file:-
>
> /static/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/specs
>
> and changed the reference of /lib/ld-linux.so.2 to
/static/lib/ld-linux.so.2
> and everything just worked!

Hadn't thought of that :-)

Horses for courses, we could also just supply "
-Wl--dynamic-linker,/static/lib/ld-linux.so.2" to the compile/link flags

> Anyway, I'm still playing around and experimenting. I haven't even
entered
> the chroot yet and I still have some reservations about how stuff will
work
> in there. We'll see..

Works fine :-)

> PS - when you are you going to start using a decent mail reader that
doesn't
> mangle the threads? Bloody Lotus Bloats :-)

Mate, if I could I would, curse of the on-site contractor stuck using
webmail from an SOE M$ box :-/

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list