Cross-LFS build method

Dominic L Hilsbos DHilsbosLFS at
Thu Jun 16 21:39:21 PDT 2005

Ryan.Oliver at wrote:

> Main reason for the native build is so configure will pickup everything
>correctly, some assumptions do get made by autofoo when cross-compiling.
>If you wanted speed you could
>a) run configure on the target system, but cross-compile on the faster host
>   You would
>   1) create sysrooted cross-tools on the compile host with /lib /usr/lib
>      and /usr/include nfs mounted from the target system into the
>      sysroot
>   2) nfs mount your build dir from the compiler host onto the target host
>      in the same location
>   3) run configure specifying CC, CXX etc as TARGET-gcc on the target host
>   4) switch to the compile host and run make
>b) Use distcc, you would setup a cross-toolchain on the faster host(s) as
>   per 1 above, and specify CC=TARGET-gcc to configure so distcc uses the
>   correct gcc on the other compile nodes
>This way everything gets configured correctly, and those packages which
>dont like being cross-compiled ( due to AC_RUN checks etc ) wouldn't be
>This is of course completely out of scope.
>If you want to try a full 1 pass cross-build, you can try it by using the
>cross-lfs scripts and setting USE_SYSROOT to Y, but note it is the 2 pass
>build method (with configures run native) which ensures everything is
>built correctly for the final system...
> Best Regards
I'm not a developer, but I'm going to throw my 2 cents in here too.  I'm 
for the complete cross build myself, for LFS and BLFS, if only for the 
educational  potential of it.  I'll also say that I like both a) and b) 
above, I like b) more, but thats just me.  My other thought is, why not 
just go ahead and look at it?  Put together the commands, write it up, 
see how far it gets.  I know, it's easy for me to say, I can't possibly 
offer anything of value, but hey...  One fianl thought, however you end 
up going I'm certain it'll end up as superb as whats gone before.

Dominic L Hilsbos

More information about the lfs-dev mailing list