Matthew Burgess wrote:
GCC-3.x appears to support -dumpspecs
Obviously (now I've read the two books!), that won't tell us where the
specs file lives, which is what we need to know! For a clearer
comparison of the two books, here's the relevant snippets:
gcc4:
SPECFILE=`gcc -print-search-dirs | head -n 1 | awk '{ print $2 "specs"
}'` &&
gcc -dumpspecs > $SPECFILE &&
sed -i -e '[EMAIL PROTECTED]/lib/ld-linux.so.2@/tools&@g' $SPECFILE &&
unset SPECFILE
development:
SPECFILE=`gcc --print-file specs` &&
sed 's@ /lib/ld-linux.so.2@ /tools/lib/[EMAIL PROTECTED]' \
$SPECFILE > tempspecfile &&
mv -f tempspecfile $SPECFILE &&
unset SPECFILE
Now, if we can simplify gcc4's SPECFILE assignment, that's great.
However, as Greg mentions above, -print-file-name is only documented to
print out library files that would be linked to. As we'd be asking it
to print out a non-library file, surely that's just as undocumented and
therefore prone to breakage as our current method, no?
As an aside, I just noticed that we use 'sed -i -e' in gcc4. At this
point, we're not guaranteed to have a 'sed' that understands the '-i'
option, and the '-e' option is superfluous. I'll fix these up tonight.
Matt.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page