Changeset 8402

Show
Ignore:
Timestamp:
10/05/07 17:16:17 (1 year ago)
Author:
jhuntwork
Message:

Opted for case syntax for testing the architecture in Glibc

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/jh/BOOK/chapter05/adjusting.xml

    r8282 r8402  
    3333  dumping GCC's <quote>specs</quote> file to a location where GCC will look for it 
    3434  by default. A simple <command>sed</command> substitution then alters the 
    35   dynamic linker that GCC will use.</para> 
     35  dynamic linker that GCC will use. The principle here is to find all references 
     36  to the dynamic linker file in <filename class="directory">/lib</filename> 
     37  or possibly <filename class="directory">/lib64</filename> if the host system 
     38  is 64-bit capable, and adjust them to point to the new location in 
     39  <filename class="directory">/tools</filename>.</para> 
    3640 
    3741  <para>For the sake of accuracy, it is recommended to use a copy-and-paste 
    3842  method when issuing the following command. Be sure to visually inspect the 
    39   specs file and verify that all occurrences of <quote>/lib/ld-linux.so.2</quote> 
    40   have been replaced with <quote>/tools/lib/ld-linux.so.2</quote>:</para> 
    41  
    42   <important> 
    43     <para>If working on a platform where the name of the dynamic linker is 
    44     something other than <filename class="libraryfile">ld-linux.so.2</filename>, 
    45     replace <quote>ld-linux.so.2</quote> with the name of the platform's 
    46     dynamic linker in the following commands. Refer to <xref 
    47     linkend="ch-tools-toolchaintechnotes" role=","/> if necessary. Additionally, 
    48     note that on 64-bit machines the linker may actually be expected in the 
    49     <filename class="directory">/lib64</filename> directory.</para> 
    50   </important> 
     43  specs file to verify that it has properly adjusted all references to the 
     44  dynamic linker location. Refer to <xref 
     45    linkend="ch-tools-toolchaintechnotes" role=","/> for the default name 
     46  of the dynamic linker, if necessary.</para> 
    5147 
    5248<!-- Ampersands are needed to allow copy and paste --> 
  • branches/jh/BOOK/chapter05/glibc.xml

    r8401 r8402  
    6060    that is changed when setting -march.</para> 
    6161 
    62 <screen><userinput remap="configure">if [ uname -m | grep -q i[4-7]86 ]; do 
    63   echo "CFLAGS += -march=i486" &gt; configparms 
    64 done</userinput></screen> 
     62<screen><userinput remap="configure">case `uname -m` in 
     63  i?86) echo "CFLAGS += -march=i486 -mtune=native" &gt; configparms ;; 
     64esac</userinput></screen> 
    6565 
    6666    <para>Next, prepare Glibc for compilation:</para> 
  • branches/jh/BOOK/chapter06/glibc.xml

    r8401 r8402  
    107107    <para>Again, add the needed compiler flags to CFLAGS for x86 machines:</para> 
    108108 
    109 <screen><userinput remap="configure">if [ uname -m | grep -q i[4-7]86 ]; do 
    110   echo "CFLAGS += -march=i486" &gt; configparms 
     109<screen><userinput remap="configure">case `uname -m` in 
     110  i?86) echo "CFLAGS += -march=i486 -mtune=native" &gt; configparms ;; 
    111111done</userinput></screen> 
    112112