On 03/20/2016 04:29 PM, Glenn Becker wrote:
Hi again --
I am back at 6.10, 'Adjusting the toolchain.'
Near the top it reads:
/
Next, amend the GCC specs file so that it points to the new dynamic
linker. Simply deleting all instances of “/tools” should leave us with
the correct path to the dynamic linker. Also adjust the specs file so
that GCC knows where to find the correct headers and Glibc start files.
A *sed* command accomplishes this .../
However, if I do this:
root:/sources/bzip2-1.0.6# gcc -dumpspecs | grep tools
I get
%{!static:--eh-frame-hdr} %{!mandroid|tno-android-ld:%{m16|m32|mx32:;:-m
elf_x86_64} %{m16|m32:-m elf_i386}
%{mx32:-m elf32_x86_64} %{shared:-shared} %{!shared:
%{!static: %{rdynamic:-export-dynamic}
%{m16|m32:-dynamic-linker
%{muclibc:*/tools*/lib/ld-uClibc.so.0;:%{mbionic:/system/bin/linker;:*/tools/*lib/ld-linux.so.2}}}
... /more instances of '/tools'/
'/tools' still shows up in the specs.
I tried exiting the chroot and re-entering, and re-entering the sed
command in 6.10:
gcc -dumpspecs | sed -e 's@/tools@@g' \
-e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
-e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \
`dirname $(gcc --print-libgcc-file-name)`/specs
but get the same result. I'm trying to avoid starting over from the
beginning -- it appears, anyway, that this sed command does not work on
my machine ... the instruction states 'all instances' of /tools should
be removed.
I truly appreciate the help.
/Glenn
Hi Glenn,
No matter how many times you try the sed instruction at this point, 'gcc
-dumpspecs' will return the same output. It is not an error. That sed
instruction does not change the compiler you built on Ch5.
Try this at this point:
# gcc -dumspecs > old.txt
# gcc -dumpspecs | sed -e 's@/tools@@g' \
> -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
> -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \
> new.txt
# diff old.txt new.txt
Can you see now the difference?
This is what the book means by "It is a good idea to visually inspect
the specs file to verify the intended change was actually made".
Issuing again 'gcc -dumpspecs' does not inspect the new specs file, but
the internal specs of the Ch5 compiler.
What the 'sed > specs' does it to create a NEW file in the right place,
so next gcc compilations do behave differently, as you want.
So the test to do after the 'sed' instruction is not 'gcc -dumspecs' but
compile something (issue the next instructions on the book).
Then check the outputs as explained. You are now using the temporary Ch5
compiler PLUS the new specs file put in the right place.
Hope it helps.
Alz.
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style