The gcc specs patch

Robert Connolly robert at linuxfromscratch.org
Sat May 22 06:28:20 PDT 2004


I sent this yesterday, sorry if you get a duplicate.

Has anyone considered including a sed-like libc regex function in
gcc/gcc.c 
for LINK_SPEC. In sh it would be something like:

LINK_SPEC="-m elf_i386 %{shared:-shared} %{!shared: %{!ibcs:
%{!static: %
{rdynamic:-export-dynamic}  %{!dynamic-linker:-dynamic-linker /lib/
ld-linux.so.2}} %{static:-static}}}"

TOOLDIR=/tools

if [$TOOLDIR > 0] then;
export LINK_SPEC=`echo LINK_SPEC | sed -e 's@/usr/lib@/tools/lib at g' |
sed -e 
's@/lib@/tools/lib at g'`

Or something like that, but in C. A patch like this would be smaller
and more 
portable. A configure option could change TOOLDIR to /whatever. And
the same 
patch could be applied to chap6 without harm (don't set TOOLDIR and
the 
defaults are used).



More information about the lfs-dev mailing list