Changeset 8402
- Timestamp:
- 10/05/07 17:16:17 (1 year ago)
- Files:
-
- branches/jh/BOOK/chapter05/adjusting.xml (modified) (1 diff)
- branches/jh/BOOK/chapter05/glibc.xml (modified) (1 diff)
- branches/jh/BOOK/chapter06/glibc.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/jh/BOOK/chapter05/adjusting.xml
r8282 r8402 33 33 dumping GCC's <quote>specs</quote> file to a location where GCC will look for it 34 34 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> 36 40 37 41 <para>For the sake of accuracy, it is recommended to use a copy-and-paste 38 42 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> 51 47 52 48 <!-- Ampersands are needed to allow copy and paste --> branches/jh/BOOK/chapter05/glibc.xml
r8401 r8402 60 60 that is changed when setting -march.</para> 61 61 62 <screen><userinput remap="configure"> if [ uname -m | grep -q i[4-7]86 ]; do63 echo "CFLAGS += -march=i486" > configparms64 done</userinput></screen>62 <screen><userinput remap="configure">case `uname -m` in 63 i?86) echo "CFLAGS += -march=i486 -mtune=native" > configparms ;; 64 esac</userinput></screen> 65 65 66 66 <para>Next, prepare Glibc for compilation:</para> branches/jh/BOOK/chapter06/glibc.xml
r8401 r8402 107 107 <para>Again, add the needed compiler flags to CFLAGS for x86 machines:</para> 108 108 109 <screen><userinput remap="configure"> if [ uname -m | grep -q i[4-7]86 ]; do110 echo "CFLAGS += -march=i486" > configparms109 <screen><userinput remap="configure">case `uname -m` in 110 i?86) echo "CFLAGS += -march=i486 -mtune=native" > configparms ;; 111 111 done</userinput></screen> 112 112
