On 4/13/06, Archaic <[EMAIL PROTECTED]> wrote:
>
> Chapter 6 gcc says to repeat previous sanity checks, but that doesn't
> quite work. Dan has made a proposal here (which included other sanity
> test changes):
> http://linuxfromscratch.org/pipermail/lfs-dev/2006-March/056423.html
>
> We need to discuss if this is effective enough, overkill, or just right.

Assuming that everyone's silence from my original post means they
think the added sanity checks are overkill, I will just mention the
one necessary change.  If anyone wants to hear rationale for more
sanity checks, I will go into it.

We now check that the glibc start files (crt{i,1,n}.o) are found in
/usr/lib instead of /tools/lib during the Re-Adjusting phase.  The
current check looks like this:

grep "/usr/lib/crt.* " dummy.log

When *startfile_prefix_spec is in effect, this is accurate.  However,
after the final GCC is installed, the path is relative to the GCC
searchdirs.  So, that check bombs.  The glibc startfiles will be shown
to be here (on an i686-pc-linux-gnu build):

attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../crt1.o succeeded

This command will continue to find the glibc start files after GCC is installed:

$ grep '/usr/lib.*crt.* ' dummy.log
attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../crt1.o succeeded
attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../crti.o succeeded
attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.0.3/crtbegin.o succeeded
attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.0.3/crtend.o succeeded
attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../crtn.o succeeded

The only drawback here is that grep is also finding the GCC startfiles
(crtend.o, crtbegin.o) and this may confuse people since they wouldn't
be found during Re-Adjusting.  Another option is to just pick one
glibc startfile or specify them all:

$ grep '/usr/lib.*crt1.* ' dummy.log
attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../crt1.o succeeded

$ grep '/usr/lib.*crt[1in].* ' dummy.log
attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../crt1.o succeeded
attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../crti.o succeeded
attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../crtn.o succeeded

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

Reply via email to