Please treat all of the below as unconfirmed because I have just too many deviations from any book. This has been discovered while trying to speed up Perl ./configure.gnu stage for x86_64-64 cross-lfs in qemu by pre-seeding config.sh with various no-brainer checks.

In short, it looks like Chapter 5 Perl creates the UU/findhdr file with the following contents in the beginning:

#!/bin/sh
wanted=$1
name=''
for usrincdir in /usr/include
do
       if test -f $usrincdir/$wanted; then
               echo "$usrincdir/$wanted"
               exit 0
       fi
done

and then follows the code that invokes the perprocessor to check whether the $wanted header really doesn't exist. The problem is that any header in /usr/include but not in /tools/include will be found as existing by Perl Configure script, thus leaking unwanted influence from the host to Chapter 5 Perl. While nobody reported a failed compilation because of that, it is still bad.

Proposal: If all of the above gets verified, add the equivalent of the following sed to the perl -libc patch:

sed -i 's,in \$usrinc,in /tools/include,' Configure

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

Reply via email to