Changeset a07a34d for chapter06/adjusting.xml
- Timestamp:
- 04/21/2020 01:41:01 PM (4 years ago)
- Branches:
- multilib-10.1
- Children:
- 0ce8c18
- Parents:
- bd67f69
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/adjusting.xml
rbd67f69 ra07a34d 25 25 ln -sv /tools/bin/ld /tools/$(uname -m)-pc-linux-gnu/bin/ld</userinput></screen> 26 26 27 <para>Next, amend the GCC specs file so that it points to the new 28 dynamic linker. Simply deleting all instances of <quote>/tools</quote> should 29 leave us with the correct path to the dynamic linker. Also adjust the specs file 30 so that GCC knows where to find the correct headers and Glibc start files. 27 <para>the next command amends the GCC specs file to achieve three goals: 28 first point GCC to the new dynamic linker. Simply deleting all instances of 29 <quote>/tools</quote> should leave us with the correct path to the dynamic 30 linker. Second, let GCC know where to find the Glibc start files. Third, 31 add the /usr/include directory at the end of the default search path, so 32 that header files added in chapter 6 are found. 31 33 A <command>sed</command> command accomplishes this:</para> 32 34 33 35 <screen><userinput>gcc -dumpspecs | sed -e 's@/tools@@g' \ 34 36 -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \ 35 -e '/\*cpp:/{n;s@$@ -i system/usr/include@}' > \37 -e '/\*cpp:/{n;s@$@ -idirafter /usr/include@}' > \ 36 38 `dirname $(gcc --print-libgcc-file-name)`/specs</userinput></screen> 37 39 … … 73 75 files:</para> 74 76 75 <screen><userinput>grep -B 1'^ /usr/include' dummy.log</userinput></screen>77 <screen><userinput>grep -B4 '^ /usr/include' dummy.log</userinput></screen> 76 78 77 79 <para os="h">This command should return the following output:</para> 78 80 79 81 <screen><computeroutput>#include <...> search starts here: 82 /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include 83 /tools/include 84 /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed 80 85 /usr/include</computeroutput></screen> 86 87 <note><para>On a 32 bit system, x86_64 is replaced with i686.</para></note> 81 88 82 89 <para os="i">Next, verify that the new linker is being used with the correct search paths:</para>
Note:
See TracChangeset
for help on using the changeset viewer.