- Timestamp:
- 09/03/2007 05:07:19 AM (17 years ago)
- Children:
- c11bcb7
- Parents:
- a6be895
- Location:
- chapter05
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter05/binutils-pass1.xml
ra6be895 r4759793f 58 58 </note> 59 59 60 <para>Test to see if the host is a 64-bit capable machine and set a variable61 if it is.</para>62 63 <screen><userinput>test $(uname -m | grep 64) && M64="-m64"</userinput></screen>64 65 60 <para>Now prepare Binutils for compilation:</para> 66 61 67 <screen><userinput>CC="gcc -B/usr/bin/ $M64" ../binutils-&binutils-version;/configure \ 68 --prefix=/tools --disable-nls --disable-werror 69 unset M64</userinput></screen> 62 <screen><userinput>CC="gcc -B/usr/bin/" ../binutils-&binutils-version;/configure \ 63 --prefix=/tools --disable-nls --disable-werror</userinput></screen> 70 64 71 65 <variablelist> … … 73 67 74 68 <varlistentry> 75 <term><envar>CC="gcc -B/usr/bin/ $M64"</envar></term>69 <term><envar>CC="gcc -B/usr/bin/"</envar></term> 76 70 <listitem> 77 71 <para>This forces <command>gcc</command> to prefer the linker from … … 80 74 built here is not compatible with the host's <command>gcc</command>. 81 75 </para> 82 <para>Also, if the cpu-type is 64-bit capable, the variable <envar>$M64</envar>83 will contain the parameter <parameter>-m64</parameter>. Otherwise, the84 variable is empty. The parameter forces <command>gcc</command> to build85 64-bit binaries. Using that parameter here and for the next package86 ensures creation of a linker, assembler and compiler that will in turn87 create only 64-bit binaries. This is necessary since currently this book88 does not support the creation of multilib systems, i.e., those with both89 32-bit and 64-bit libraries. This will only make a difference on hosts that90 are themselves multilib and employ a compiler that creates 32-bit binaries91 by default.</para>92 76 </listitem> 93 77 </varlistentry> -
chapter05/gcc-pass1.xml
ra6be895 r4759793f 44 44 cd ../gcc-build</userinput></screen> 45 45 46 <para>Test to see if the host is a multilib capable machine and set a variable 47 if it is. This ensures that only 64-bit binaries are built if using such a host. 48 Also, the --with-arch flag is only necessary for x86 machines.</para> 46 <para>Set the --with-arch flag if the machine is x86:</para> 49 47 50 <screen><userinput>case $(uname -m) in 51 i?86) WITHARCH="--with-arch=i486" ;; 52 x86_64) M64="-m64" ;; 53 esac</userinput></screen> 48 <screen><userinput>test $(uname -m | grep i?86) && WITHARCH="--with-arch=i486"</userinput></screen> 54 49 55 50 <para>Prepare GCC for compilation:</para> 56 51 57 <screen><userinput>CC="gcc -B/usr/bin/ $M64" ../gcc-&gcc-version;/configure --prefix=/tools \52 <screen><userinput>CC="gcc -B/usr/bin/" ../gcc-&gcc-version;/configure --prefix=/tools \ 58 53 --with-local-prefix=/tools --disable-nls --disable-shared \ 59 54 --enable-languages=c --disable-multilib \ 60 55 $WITHARCH 61 unset M64WITHARCH</userinput></screen>56 unset WITHARCH</userinput></screen> 62 57 63 58 <variablelist> -
chapter05/gcc-pass2.xml
ra6be895 r4759793f 135 135 variables that override the default optimization flags.</para> 136 136 137 <para>The --with-arch flag is only necessary for x86 machines.</para> 138 139 <screen><userinput>case $(uname -m) in 140 i?86) WITHARCH="--with-arch=i486" ;; 141 esac</userinput></screen> 137 <para>Set the --with-arch flag if the machine is x86:</para> 138 139 <screen><userinput>test $(uname -m | grep i?86) && WITHARCH="--with-arch=i486"</userinput></screen> 142 140 143 141 <para>Now prepare GCC for compilation:</para>
Note:
See TracChangeset
for help on using the changeset viewer.