Changeset a4f63e4


Ignore:
Timestamp:
02/27/2022 03:36:55 PM (7 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
11.2, 11.2-rc1, multilib, s6-init, trunk, xry111/arm64, xry111/clfs-ng, xry111/lfs-next, xry111/queue-11.3
Children:
859502b
Parents:
83c258f
git-author:
Xi Ruoyao <xry111@…> (02/27/2022 05:04:05 AM)
git-committer:
Xi Ruoyao <xry111@…> (02/27/2022 03:36:55 PM)
Message:

remove adjusting.xml

Now adjusting.xml only serves as a historical reference, and a "snip
library" for gcc.xml. Put all relevant content into gcc.xml directly
and remove adjusting.xml. If someone needs a historical reference, he
can always get adjusting.xml in Git history.

Location:
chapter08
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • chapter08/gcc.xml

    r83c258f ra4f63e4  
    198198    some sanity checks:</para>
    199199
    200     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    201     href="adjusting.xml"
    202     xpointer="xpointer(//*[@os='a'])"/>
    203 
    204     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    205     href="adjusting.xml"
    206     xpointer="xpointer(//*[@os='b'])"/>
    207 
    208     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    209     href="adjusting.xml"
    210     xpointer="xpointer(//*[@os='c'])"/>
    211 
    212     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    213     href="adjusting.xml"
    214     xpointer="xpointer(//*[@os='d'])"/>
    215 
    216     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    217     href="adjusting.xml"
    218     xpointer="xpointer(//*[@os='e'])"/>
    219 
    220     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    221     href="adjusting.xml"
    222     xpointer="xpointer(//*[@os='f'])"/>
     200<screen><userinput>echo 'int main(){}' &gt; dummy.c
     201cc dummy.c -v -Wl,--verbose &amp;&gt; dummy.log
     202readelf -l a.out | grep ': /lib'</userinput></screen>
     203
     204  <para>There should be no errors,
     205  and the output of the last command will be (allowing for
     206  platform-specific differences in the dynamic linker name):</para>
     207
     208<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
     209
     210  <para>Now make sure that we're setup to use the correct start files:</para>
     211
     212<screen><userinput>grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log</userinput></screen>
     213
     214  <para>The output of the last command should be:</para>
    223215
    224216<screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crt1.o succeeded
     
    233225  <filename class="directory">/usr/lib</filename> directory.</para>
    234226
    235     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    236     href="adjusting.xml"
    237     xpointer="xpointer(//*[@os='g'])"/>
     227  <para>Verify that the compiler is searching for the correct header
     228  files:</para>
    238229
    239230<screen><userinput>grep -B4 '^ /usr/include' dummy.log</userinput></screen>
    240231
    241     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    242     href="adjusting.xml"
    243     xpointer="xpointer(//*[@os='h'])"/>
     232  <para>This command should return the following output:</para>
    244233
    245234<screen><computeroutput>#include &lt;...&gt; search starts here:
     
    252241   different than the above, depending on your system architecture.</para>
    253242
    254     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    255     href="adjusting.xml"
    256     xpointer="xpointer(//*[@os='i'])"/>
    257 
    258     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    259     href="adjusting.xml"
    260     xpointer="xpointer(//*[@os='j'])"/>
    261 
    262     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    263     href="adjusting.xml"
    264     xpointer="xpointer(//*[@os='k'])"/>
     243  <para>Next, verify that the new linker is being used with the correct search paths:</para>
     244
     245<screen><userinput>grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'</userinput></screen>
     246
     247  <para>References to paths that have components with '-linux-gnu' should
     248  be ignored, but otherwise the output of the last command should be:</para>
    265249
    266250<screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
     
    285269SEARCH_DIR("/usr/lib");</computeroutput></screen>
    286270
    287     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    288     href="adjusting.xml"
    289     xpointer="xpointer(//*[@os='l'])"/>
    290 
    291     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    292     href="adjusting.xml"
    293     xpointer="xpointer(//*[@os='m'])"/>
    294 
    295     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    296     href="adjusting.xml"
    297     xpointer="xpointer(//*[@os='n'])"/>
    298 
    299     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    300     href="adjusting.xml"
    301     xpointer="xpointer(//*[@os='o'])"/>
    302 
    303     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    304     href="adjusting.xml"
    305     xpointer="xpointer(//*[@os='p'])"/>
    306 
    307     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    308     href="adjusting.xml"
    309     xpointer="xpointer(//*[@os='q'])"/>
    310 
    311     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    312     href="adjusting.xml"
    313     xpointer="xpointer(//*[@os='r'])"/>
    314 
    315     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    316     href="adjusting.xml"
    317     xpointer="xpointer(//*[@os='s'])"/>
    318 
    319     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    320     href="adjusting.xml"
    321     xpointer="xpointer(//*[@os='t'])"/>
    322 
    323     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    324     href="adjusting.xml"
    325     xpointer="xpointer(//*[@os='u'])"/>
    326 
    327     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    328     href="adjusting.xml"
    329     xpointer="xpointer(//*[@os='v'])"/>
     271  <para>Next make sure that we're using the correct libc:</para>
     272
     273<screen><userinput>grep "/lib.*/libc.so.6 " dummy.log</userinput></screen>
     274
     275  <para>The output of the last command should be:</para>
     276
     277<screen><computeroutput>attempt to open /usr/lib/libc.so.6 succeeded</computeroutput></screen>
     278
     279  <para>Make sure GCC is using the correct dynamic linker:</para>
     280
     281<screen><userinput>grep found dummy.log</userinput></screen>
     282
     283  <para>The output of the last command should be (allowing for
     284  platform-specific differences in dynamic linker name):</para>
     285
     286<screen><computeroutput>found ld-linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2</computeroutput></screen>
     287
     288  <para>If the output does not appear as shown above or is not received
     289  at all, then something is seriously wrong. Investigate and retrace the
     290  steps to find out where the problem is and correct it. <!--The most likely
     291  reason is that something went wrong with the specs file adjustment.--> Any
     292  issues will need to be resolved before continuing with the process.</para>
     293
     294  <para>Once everything is working correctly, clean up the test files:</para>
     295
     296<screen><userinput>rm -v dummy.c a.out dummy.log</userinput></screen>
    330297
    331298    <para>Finally, move a misplaced file:</para>
Note: See TracChangeset for help on using the changeset viewer.