Hi,

I don't quite understand how re-writing the 'specs' file under the '/tools'
directory actually works -- by the way it does work!.

The specs file that is written with the fancy 'sed' script shows up as:

/tools/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/specs

I don't get how writing the spec file under directory '/tools' works?

The above spec file correctly has '/tools' removed leaving the correct
result behind: '/usr/lib'

However, if after running the fancy 'sed' command, I do

cc -dumpspecs | grep '/tools'
%{!static:--eh-frame-hdr} %{!m32:-m elf_x86_64} %{m32:-m elf_i386}
%{shared:-shared}   %{!shared:     %{!static:
%{rdynamic:-export-dynamic}       %{m32:%{!dynamic-linker:-dynamic-linker
%{muclibc:%{mglibc:%e-mglibc and -muclibc used
together}/tools/lib/ld-uClibc.so.0;:/tools/lib/ld-linux.so.2}}}
%{!m32:%{!dynamic-linker:-dynamic-linker %{muclibc:%{mglibc:%e-mglibc and
-muclibc used
together}/tools/lib/ld64-uClibc.so.0;:/tools/lib64/ld-linux-x86-64.so.2}}}}
%{static:-static}}

Note that '/tools' is still there.  Yet when I run the sanity check I still
get the correct result?

echo 'main(){}' > dummy.c
cc dummy.c -v -Wl,--verbose &> dummy.log
readelf -l a.out | grep ': /lib'
      [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]

grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log
/usr/lib/crt1.o succeeded
/usr/lib/crti.o succeeded
/usr/lib/crtn.o succeeded

Just curious?  I'm missing some small concept here?
Thanks,
John
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to