- Timestamp:
- 08/07/2007 08:24:04 PM (17 years ago)
- Children:
- 71f6077
- Parents:
- 400af5a8
- Location:
- chapter06
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/gcc.xml
r400af5a8 rda2f9fe 155 155 xpointer="xpointer(//*[@os='f'])"/> 156 156 157 <screen><computeroutput>/usr/lib/gcc/x86_64-unknown-linux-gnu/&gcc-version;/../../../../lib64/crt1.o succeeded 158 /usr/lib/gcc/x86_64-unknown-linux-gnu/&gcc-version;/../../../../lib64/crti.o succeeded 159 /usr/lib/gcc/x86_64-unknown-linux-gnu/&gcc-version;/../../../../lib64/crtn.o succeeded</computeroutput></screen> 157 <screen><computeroutput>/usr/lib/gcc/x86_64-unknown-linux-gnu/&gcc-version;/../../../crt1.o succeeded 158 /usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/../../../crti.o succeeded 159 /usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/../../../crtn.o succeeded</computeroutput></screen> 160 161 <para>Depending on your machine architecture, the above may differ slightly, 162 the difference usually being the name of the directory 163 after <filename class="directory">/usr/lib/gcc</filename>. If your machine is 164 a 64-bit system, you may also see a directory named <filename class="directory">lib64</filename> 165 towards the end of the string. The important thing to 166 look for here is that gcc has found all three <filename>crt*.o</filename> files under 167 the <filename class="directory">/usr/lib</filename> directory.</para> 160 168 161 169 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" … … 174 182 /usr/include</computeroutput></screen> 175 183 184 <para>Again, note that the directory named after your target triplet may be 185 different than the above, depending on your architecture.</para> 186 176 187 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 177 188 href="readjusting.xml" … … 185 196 href="readjusting.xml" 186 197 xpointer="xpointer(//*[@os='k'])"/> 198 199 <screen><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib") 200 SEARCH_DIR("/usr/local/lib") 201 SEARCH_DIR("/lib") 202 SEARCH_DIR("/usr/lib");</computeroutput></screen> 203 204 <para>A 64-bit system may see a few more directories. For example, here 205 is the output from a x86_64 machine:</para> 187 206 188 207 <screen><computeroutput>SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib64") -
chapter06/readjusting.xml
r400af5a8 rda2f9fe 38 38 this:</para> 39 39 40 <important> 41 <para>If working on a platform where the name of the dynamic linker is 42 something other than <filename class="libraryfile">ld-linux-x86-64.so.2</filename>, 43 substitute <quote>ld-linux-x86-64.so.2</quote> with the name of the platform's 44 dynamic linker in the following commands. Refer to <xref 45 linkend="ch-tools-toolchaintechnotes" role=","/> if necessary.</para> 46 </important> 47 48 <screen><userinput>gcc -dumpspecs | sed \ 49 -e 's@/tools/lib64/ld-linux-x86-64.so.2@/lib64/ld-linux-x86-64.so.2@g' \ 40 <screen><userinput>gcc -dumpspecs | sed -e 's@/tools@@g' \ 50 41 -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \ 51 42 -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \ … … 67 58 platform-specific differences in dynamic linker name):</para> 68 59 69 <screen os="c"><computeroutput>[Requesting program interpreter: /lib 64/ld-linux-x86-64.so.2]</computeroutput></screen>60 <screen os="c"><computeroutput>[Requesting program interpreter: /lib/ld-linux.so.2]</computeroutput></screen> 70 61 71 62 <para>Note that <filename class="directory">/lib</filename> is now … … 98 89 99 90 <para os="k">If everything is working correctly, there should be no errors, 100 and the output of the last command will be:</para> 91 and the output of the last command (allowing for platform-specific target triplets) 92 will be:</para> 101 93 102 <screen><computeroutput>SEARCH_DIR("/tools/ x86_64-unknown-linux-gnu/lib")94 <screen><computeroutput>SEARCH_DIR("/tools/i686-pc-linux-gnu/lib") 103 95 SEARCH_DIR("/usr/lib") 104 96 SEARCH_DIR("/lib");</computeroutput></screen> … … 106 98 <para os="l">Next make sure that we're using the correct libc:</para> 107 99 108 <screen os="m"><userinput>grep "/lib 64/libc.so.6 " dummy.log</userinput></screen>100 <screen os="m"><userinput>grep "/lib.*/libc.so.6 " dummy.log</userinput></screen> 109 101 110 102 <para os="n">If everything is working correctly, there should be no errors, 111 and the output of the last command will be:</para> 103 and the output of the last command (allowing for a lib64 directory on 64-bit hosts) 104 will be:</para> 112 105 113 <screen os="o"><computeroutput>attempt to open /lib 64/libc.so.6 succeeded</computeroutput></screen>106 <screen os="o"><computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput></screen> 114 107 115 108 <para os="p">Lastly, make sure GCC is using the correct dynamic linker:</para> … … 119 112 <para os="r">If everything is working correctly, there should be no errors, 120 113 and the output of the last command will be (allowing for 121 platform-specific differences in dynamic linker name):</para> 114 platform-specific differences in dynamic linker name and a lib64 directory 115 on 64-bit hosts):</para> 122 116 123 <screen os="s"><computeroutput>found ld-linux -x86-64.so.2 at /lib64/ld-linux-x86-64.so.2</computeroutput></screen>117 <screen os="s"><computeroutput>found ld-linux.so.2 at /lib/ld-linux.so.2</computeroutput></screen> 124 118 125 119 <para os="t">If the output does not appear as shown above or is not received
Note:
See TracChangeset
for help on using the changeset viewer.