Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOOK/cross-tools/common/gcc-static.xml

    r9e0069f rcc858ed  
    2424    and no Threads</title>
    2525
    26     <para os="e">Here we will compile GCC, as a cross-compiler that will create
    27     executables for our target architechture, statically so that it will not
    28     need to look for Glibc's startfiles, which do not yet exist in
    29     <filename class="directory">/tools</filename>. We will use this
    30     cross-compiler, plus the cross-linker we have just installed with Binutils,
    31     to compile Glibc. After Glibc is installed into
    32     <filename class="directory">/tools</filename>, we can rebuild GCC
    33     so that it will then be able to build executables that link against the
    34     libraries in <filename class="directory">/tools</filename>.</para>
    35 
    3626    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    3727    href="../../final-system/common/gcc.xml"
     
    4838<screen os="ab"><userinput>patch -Np1 -i ../&gcc-specs-patch;</userinput></screen>
    4939
    50     <para os="ag">Change the StartFile Spec so that GCC looks in
     40    <para os="ag">Change the StartFile Spec so that GCC looks in 
    5141<filename class="directory">/tools</filename>:</para>
    5242
     
    7262
    7363<screen os="al"><userinput>AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
    74     ../gcc-&gcc-version;/configure --prefix=/cross-tools \
    75     --build=${CLFS_HOST} --host=${CLFS_HOST} --target=${CLFS_TARGET} \
    76     --with-sysroot=${CLFS} --with-local-prefix=/tools \
    77     --with-native-system-header-dir=/tools/include --disable-nls \
    78     --disable-shared --with-mpfr=/cross-tools --with-gmp=/cross-tools \
    79     --with-isl=/cross-tools --with-cloog=/cross-tools --with-mpc=/cross-tools \
    80     --without-headers --with-newlib --disable-decimal-float --disable-libgomp \
    81     --disable-libmudflap --disable-libssp --disable-libatomic --disable-libitm \
    82     --disable-libsanitizer --disable-libquadmath --disable-threads \
    83     --disable-multilib --disable-target-zlib --with-system-zlib \
    84     --enable-languages=c --enable-checking=release</userinput></screen>
     64  ../gcc-&gcc-version;/configure --prefix=/cross-tools \
     65  --build=${CLFS_HOST} --host=${CLFS_HOST} --target=${CLFS_TARGET} \
     66  --with-sysroot=${CLFS} --with-local-prefix=/tools \
     67  --with-native-system-header-dir=/tools/include --disable-nls \
     68  --disable-shared --with-mpfr=/cross-tools --with-gmp=/cross-tools \
     69  --with-isl=/cross-tools --with-cloog=/cross-tools --with-mpc=/cross-tools \
     70  --without-headers --with-newlib --disable-decimal-float --disable-libgomp \
     71  --disable-libmudflap --disable-libssp --disable-threads --disable-multilib \
     72  --disable-libatomic --disable-libitm --disable-libsanitizer \
     73  --disable-libquadmath --disable-target-libiberty --disable-target-zlib \
     74  --with-system-zlib --enable-cloog-backend=isl --disable-isl-version-check \
     75  --enable-languages=c --enable-checking=release</userinput></screen>
    8576
    8677    <variablelist os="am">
    8778      <title>The meaning of the new configure options:</title>
     79
     80      <varlistentry>
     81        <term><parameter>--with-sysroot=${CLFS}</parameter></term>
     82        <listitem>
     83          <para>Tells GCC to consider ${CLFS} as the root file system.</para>
     84        </listitem>
     85      </varlistentry>
    8886
    8987     <varlistentry>
     
    9896      </varlistentry>
    9997
     98
    10099      <varlistentry>
    101100        <term><parameter>--with-native-system-headers-dir=/tools/include</parameter></term>
     
    108107
    109108      <varlistentry>
    110         <term><parameter>--disable-shared</parameter></term>
    111         <listitem>
    112           <para>This tells GCC not to create a shared library.</para>
     109        <term><parameter>--disable-nls</parameter></term>
     110        <listitem>
     111          <para>This disables internationalization as i18n is not needed for the
     112          cross-compile tools.</para>
    113113        </listitem>
    114114      </varlistentry>
     
    136136
    137137      <varlistentry>
    138         <term><parameter>--disable-lib*</parameter></term>
    139         <listitem>
    140           <para>These options prevent GCC from building a number of libraries
    141           that are not needed at this time.</para>
     138        <term><parameter>--disable-libgomp</parameter></term>
     139        <listitem>
     140          <para>Disables the creation of runtime libraries used by GOMP.</para>
     141        </listitem>
     142      </varlistentry>
     143
     144      <varlistentry>
     145        <term><parameter>--disable-libmudflap</parameter></term>
     146        <listitem>
     147          <para>Disables the creation of runtime libaries used by libmudflap.</para>
     148        </listitem>
     149      </varlistentry>
     150
     151      <varlistentry>
     152        <term><parameter>--disable-libssp</parameter></term>
     153        <listitem>
     154          <para>Disables the use of Stack Smashing Protection for runtime libraries.</para>
    142155        </listitem>
    143156      </varlistentry>
     
    154167
    155168      <varlistentry>
    156         <term><parameter>--disable-target-zlib</parameter></term>
    157         <listitem>
    158           <para>This tells GCC stuff.</para>
    159         </listitem>
    160       </varlistentry>
    161 
    162       <varlistentry>
    163         <term><parameter>--with-system-zlib</parameter></term>
    164         <listitem>
    165           <para>This tells GCC to link to the system-installed zlib instead
    166           of the one in its source tree.</para>
     169        <term><parameter>--disable-libatomic</parameter></term>
     170        <listitem>
     171          <para>The atomic library isn't needed at this time.</para>
     172        </listitem>
     173      </varlistentry>
     174
     175      <varlistentry>
     176        <term><parameter>--disable-libitm</parameter></term>
     177        <listitem>
     178          <para>The itm library isn't neeeded at this tiem.</para>
     179        </listitem>
     180      </varlistentry>
     181
     182      <varlistentry>
     183        <term><parameter>--disable-libsanitizer</parameter></term>
     184        <listitem>
     185          <para>The sanitizer library isn't needed at this time.</para>
     186        </listitem>
     187      </varlistentry>
     188
     189      <varlistentry>
     190        <term><parameter>--disable-libquadmath</parameter></term>
     191        <listitem>
     192          <para>The quadmath library isn't needed at this time.</para>
    167193        </listitem>
    168194      </varlistentry>
     
    205231<screen os="ar"><userinput>make install-gcc install-target-libgcc</userinput></screen>
    206232
    207     <para os="as">Copy <filename class="headerfile">libiberty.h</filename> to
    208     <filename class="directory">/tools/include</filename> directory:</para>
    209 
    210 <screen os="at"><userinput>cp -v ../gcc-&gcc-version;/include/libiberty.h /tools/include</userinput></screen>
    211 
    212233  </sect2>
    213234
Note: See TracChangeset for help on using the changeset viewer.