Greg Schafer wrote:
> You should perform some kind of sanity check. Something like this from the
> DIY Next Gen build method is not perfect but might help:
>
> # Sanity check - ensure host not being searched for libs
> echo 'main(){}' | cc -x c -lbogus -v -Wl,--verbose - &> foo || :
> if grep "^attempt to open /usr" foo; then
> echo Oops; exit 1
> fi
Or, just for fun:
echo 'main(){}' |
gcc -x c -lbogus -v -Wl,--verbose - 2>&1 |
grep attempt |
cut -f4 -d" " |
while read line; do dirname $line; done |
sort |
uniq
On my system, it still looks at /usr/lib three times (8 times if you
leave off the uniq):
/usr/bin/../lib
/usr/lib
/usr/lib/gcc/i686-pc-linux-gnu/4.0.2/../../..
Yes, it is an older compiler on this system.
-- Bruce
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page