Mathijs Kwik wrote:
> I am wondering why the package order for building the cross-compile
> tools (Chapter 5) is chosen the way it is.
> why are linux-headers in front of binutils? are they used during the
> build?
> I noticed I can switch those 2 without errors.
> also I found some other document describing the building of a
> toolchain which just has binutils first.
> http://frank.harvard.edu/~coldwell/toolchain/
> <http://frank.harvard.edu/%7Ecoldwell/toolchain/>
> also, gcc is rebuilt after glibc to build against it, why isn't
> binutils rebuilt? isn't binutils still built against the host's glibc?
The order of binutils/linux-headers really isn't critical. Binutils
doesn't look for them nor does it need them. I belive that the
linux-headers are needed for gcc.
Binutils provides mainly the asembler and linker for our arch.
glibc-headers provides glibc headers for gcc-static so we don't have to
include them from the host.
gcc-static is used to build glibc. if you tried to build anything that
didn't contain it's own start files you would get an error about crti.o
not found.
Glibc is built providing the a bunch of libraries but mainly ld-2.4.so
and the start files (crti.o crt1.o crtn.o).
gcc-final is built with shared libs (mainly for libstdc++.so.6). this
compiler knows about the start files gcc installed and uses them to
compile. A sanity check needs to be put in this part of the book to make
sure all is well.
At this point binutils doesn't need to be rebuilt because nothing would
be gained from rebuilding it. It has to be linked against the hosts
glibc because it runs on the host. The linkers search path is still
correct from the first build. There is no need to change it because
there is no toolchain like in {c,}lfs, that we're trying to isolate the
final system from.
> I'd also like to know how to handle updating toolchain stuff.
> if binutils gets updated, should I rebuild glibc and gcc then?
> or go gcc-static, glibc, gcc again? or doesn't binutils have much
> impact on the toolchain?
>
> if gcc gets updated, should I rebuild binutils and/or glibc?
>
> and if glibc gets updated, would it suffice to rebuild gcc afterwards
> or is the gcc-static, glibc, gcc cycle needed again?
>
> I hope I'm not asking realy stupid questions, but I can't find a real
> answer/rationale elsewhere.
Honestly, I do not know how to handle updating the toolchain stuff. I've
only done compete rebuilds every time a change goes in the book. I do
know that if you try to build glibc again, after gcc-final is installed,
it will bomb. Why glibc bombs, I don't know yet. My recommendation to
you would be a complete rebuild.
_______________________________________________
Clfs-dev mailing list
[email protected]
http://ninja.linux-phreak.biz/mailman/listinfo/clfs-dev