Lessons to be learnt from recent events

Ryan.Oliver at pha.com.au Ryan.Oliver at pha.com.au
Tue Jan 28 23:30:59 PST 2003


Gerard Beekmans wrote:
> On January 28, 2003 08:58 pm, Greg Schafer wrote:
> There is simply just too much that can go wrong. Witness the plethora of

> Yes I agree it's shaky. But correct me if I'm wrong, we do get a correct
> built
> toolchain with the current instructions (minus the current binutils/gcc
> glitch) provided instructions are followed to the letter and exact
versions
> are used.
>
> > Best for me not to say any more until we have it all sorted. Less
words,
> > more action! :-)
>
> Any chance you guys can discuss this "out in the open" rather than
> privately?
> I'm sure other people have things to say/suggest (me included).

I'll only give you the rough gist, a full explanation could be a book in
itself.

The idea ( as stated in a previous post ) is to build a self-hosting
toolchain in chapter 5 which cross-links and builds everything against the
glibc we are migrating too ( no glibc migration issues in the future ).
Therefore we build Ch6 with tools that are ALREADY built against the new
glibc.

Frankly its been done off list because really not much interest was shown.

Simply

 - create /static dir (empty) on host system
 - mount --bind ${LFS}/static /static

 - Build binutils in /static - no modifications (keeps glibc happy)
 - Install kernel headers in /static/include
 - Build glibc in /static
 - Rebuild ld from binutils ensuring the linker scripts point at
/static/lib.
 - Build gcc in /static - it will use our linker and assembler installed in
   /static/TARGET-TRIPLE/bin ( where target triple is for example
    i686-pc-linux-gnu ) to build itself linked against the new glibc.
   We can either modify a header file before build or modify the specs file
   afterwards to make gcc use the dynamic linker in /static.
 - Rebuild binutils with this c compiler.

We then have a fully self hosted toolchain, linked against the new c
libraries that will build static OR shared binaries and libs linked against
libraries in /static/lib (new glibc). When we chroot, it'll all still be
there
:-)

How it hangs together... well that will be in the hint :-)
Greg and I will be running a few more builds to sanity check it ( ch5 is
pretty much sorted ), but all bodes well.

Still a little more investigation to do...
BTW dont use the posted scripts, its moved along a bit since then...

If someone really wants to play we can provide one for Ch5, but it is a
fast moving target at present...

Regards
Ryan Oliver
Peter Harding And Associates Pty. Ltd.
Eml: ryan.oliver at pha.com.au
Ph:  +613 9641 2222
Fax: +613 9641 2200
Web: http;//www.pha.com.au

-- 
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