Greg Schafer wrote:
> Hmmm, thinking about this some more, there might actually be another
> option and that's the one already raised by Alex ie: don't bootstrap GCC
> pass1 (possibly move the bootstrap to pass2 as suggested by Jeremy). As it
> currently stands, the new tools start being used in combo with the host
> glibc during stage2 of the bootstrap. We could avoid this by dropping the
> bootstrap of pass1. That leaves the only exposed areas as kernel headers
> installation and glibc configure, but if they cause problems, we might be
> able to get away some PATH twiddling. There might be some merit here..
> I'll chew on it for a while and maybe try some tests.

Alright, I've done some testing on this. (Greg, have you been able to 
look at anything related on your end?) Let me just say first of all, 
that the more I think about it, the saner it seems to save bootstrapping 
GCC until pass 2. Bootstrapping in pass 1 only tells us that GCC can 
compile itself fully and correctly using our new ld (in stages 2 and 3) 
and the host's libc. That's well and good, but we don't necessarily need 
that. What we _do_ need, is for a minimal GCC to be able to flawlessly 
build a new Glibc. On broken(?) hosts, that is a subtle but important 
difference.

The host that Alexander suggested, multilib Debian Lenny for x86_64 with 
32-bit userspace makes a good testcase. On this system we can't 
bootstrap GCC right away, even if using HJL Binutils. But, if we forgo 
bootstrapping and disable building of libmudflap, we can build what 
appears to be a solid Glibc. Note that I still need to set up the 
testcase that Greg has mentioned on the diy-linux-dev list so that I can 
run a full testsuite on the temporary Glibc. However, I was able to 
bootstrap GCC pass 2 on the aforementioned broken host. Here's what i did:

  * Install Debian testing (lenny) for amd64
  * apt-get install debootstrap
  * debootstrap --arch i386 --variant=buildd --exclude=mawk \
    --include=gawk,gcc-4.1-multilib,m4,bison,flex,bzip2,texinfo \
    lenny /mnt/testbed http://debian.osuosl.org/debian
  * chroot /mnt/testbed /bin/bash --login
  * mount -t proc proc /proc
  * mount -t sysfs sysfs /sys
  * Build up to Chapter 5 ncurses from the instructions here:
    http://www.linuxfromscratch.org/~jhuntwork/lfs-JH/
    (This currently has changes that have not been committed to
     the branch.)

Logs of my build to chapter 5 ncurses are here:
   http://www.linuxfromscratch.org/~jhuntwork/build-logs-20070820/
   (The gcc-pass1-with-libmudflap.log used the same configure commands
   but without '--disable-libmudflap'.)

The diff of my working copy for the relevant changes:
   http://www.linuxfromscratch.org/~jhuntwork/lfs-jh-20070820.diff

As usual, any insights or suggestions you may have are welcome.

--
JH
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to