Tushar Teredesai wrote:
The book used to disable gcc's fixinc. The patch that did this has
been removed. Any particular reason?
The changelog states that we may need to fix the host headers, but
fails to mention a reason. I checked the lfs-dev archives for July
2005 (when the change was made), but at first glance did not produce
anything useful.
Trying to build using gcc-4.x would fail because glibc-2.3.5 installed
headers that had syntax errors that the new compiler complained about.
We obviously can't trust the host during early chapter 5, because it
could contain anything. Once glibc has been installed, with all its
associated headers (and the ones from the earlier gcc pass), we know
exactly what state the environment will be in. Therefore, we used to
prevent the fixincludes process from running, but as we've just
installed known broken headers again this will stop anything that
includes it (I think it was "pthread.h") from compiling.
I therefore adopted the approach of letting fixincludes do its thing
(after all, it will know far better than we do
what needs fixing and what doesn't). Testing showed that nothing used
any headers that may be broken in our early chapter 5 environment, so we
simply delete anything that may have come across from the host (that is
anything in a subdirectory) and also anything with the magic string
added by the fixinclude process. In chapter 6, where we know
fixincludes will only operate on our chrooted environment, we let it run
simply because I'm fairly confident that fixincludes knows better than
most of us on this list what may need fixing.
Hope this helps,
Matt.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page