Don't run specs adjustment in place (perl -i)

Dan Nicholson dbn.lists at gmail.com
Sun Jan 29 20:06:26 PST 2006


Hi,

Currently, the perl command to do the specs adjustment has the -i
parameter.  This edits the `dirname...`/specs file in place.  This
means the user must be warned not to repeat the command lest he get

*startfile_prefix_spec:
/usr/lib/
/usr/lib/
...

However, by dropping the -i in the perl command, you will always start
with the clean, default specs from gcc -dumpspecs.  Then the command
can be repeated, and the big warning box dropped:

gcc -dumpspecs | \
perl -p -e 's@/tools/lib/ld@/lib/ld at g;' \
     -e 's@\*startfile_prefix_spec:\n@$_/usr/lib/ @g;' > \
     `dirname $(gcc --print-libgcc-file-name)`/specs

In the x86 book, this is Ch. 10.6
http://www.linuxfromscratch.org/clfs/view/cross-lfs/x86/final-system/adjusting.html

--
Dan



More information about the cross-lfs mailing list