[bf8c11f] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | <!ENTITY % patches-entities SYSTEM "../../patches.ent">
|
---|
| 6 | %general-entities;
|
---|
| 7 | %patches-entities;
|
---|
| 8 | ]>
|
---|
| 9 |
|
---|
| 10 | <sect1 id="ch-temp-system-gcc" role="wrap">
|
---|
| 11 | <?dbhtml filename="gcc.html"?>
|
---|
| 12 |
|
---|
| 13 | <title>GCC-&gcc-version;</title>
|
---|
| 14 |
|
---|
| 15 | <indexterm zone="ch-temp-system-gcc">
|
---|
| 16 | <primary sortas="a-GCC">GCC</primary>
|
---|
| 17 | <secondary>temporary system</secondary>
|
---|
| 18 | </indexterm>
|
---|
| 19 |
|
---|
| 20 | <sect2 role="package">
|
---|
| 21 | <title/>
|
---|
| 22 |
|
---|
| 23 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 24 | href="../../final-system/common/gcc.xml"
|
---|
| 25 | xpointer="xpointer(//*[@role='package']/para[1])"/>
|
---|
| 26 |
|
---|
| 27 | <segmentedlist>
|
---|
| 28 | <segtitle>&buildtime;</segtitle>
|
---|
| 29 | <segtitle>&diskspace;</segtitle>
|
---|
| 30 |
|
---|
| 31 | <seglistitem>
|
---|
| 32 | <seg>Not checked yet</seg>
|
---|
| 33 | <seg>Not checked yet</seg>
|
---|
| 34 | </seglistitem>
|
---|
| 35 | </segmentedlist>
|
---|
| 36 |
|
---|
| 37 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 38 | href="../../final-system/common/gcc.xml"
|
---|
| 39 | xpointer="xpointer(//*[@role='package']/segmentedlist[2])"/>
|
---|
| 40 |
|
---|
| 41 | </sect2>
|
---|
| 42 |
|
---|
| 43 | <sect2 role="installation">
|
---|
| 44 | <title>Installation of GCC</title>
|
---|
| 45 |
|
---|
| 46 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 47 | href="../../cross-tools/x86/gcc-static.xml"
|
---|
| 48 | xpointer="xpointer(//*[@os='aa'])"/>
|
---|
| 49 |
|
---|
| 50 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 51 | href="../../cross-tools/x86/gcc-static.xml"
|
---|
| 52 | xpointer="xpointer(//*[@os='ab'])"/>
|
---|
| 53 |
|
---|
| 54 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 55 | href="../../cross-tools/x86/gcc-static.xml"
|
---|
| 56 | xpointer="xpointer(//*[@os='ac'])"/>
|
---|
| 57 |
|
---|
| 58 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 59 | href="../../cross-tools/x86/gcc-static.xml"
|
---|
| 60 | xpointer="xpointer(//*[@os='ad'])"/>
|
---|
| 61 |
|
---|
| 62 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 63 | href="../../cross-tools/x86/gcc-static.xml"
|
---|
| 64 | xpointer="xpointer(//*[@os='ae'])"/>
|
---|
| 65 |
|
---|
| 66 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 67 | href="../../cross-tools/x86/gcc-static.xml"
|
---|
| 68 | xpointer="xpointer(//*[@os='af'])"/>
|
---|
| 69 |
|
---|
| 70 | <para os="cd">Now we will change <command>cpp</command>'s search path not to look in
|
---|
| 71 | <filename class="directory">/usr/include</filename>:</para>
|
---|
| 72 |
|
---|
| 73 | <screen os="ce"><userinput>cp gcc/cppdefault.c{,.orig}
|
---|
| 74 | sed -e '/#define STANDARD_INCLUDE_DIR/s@"/usr/include"@0@g' \
|
---|
| 75 | gcc/cppdefault.c.orig > gcc/cppdefault.c</userinput></screen>
|
---|
| 76 |
|
---|
| 77 | <para os="cf">Also, we need to set the directory searched by the fixincludes
|
---|
| 78 | process for system headers, so it won't look at the host's headers:</para>
|
---|
| 79 |
|
---|
| 80 | <screen os="cg"><userinput>cp gcc/Makefile.in{,.orig}
|
---|
| 81 | sed -e 's@\(^NATIVE_SYSTEM_HEADER_DIR =\).*@\1 /tools/include@g' \
|
---|
| 82 | gcc/Makefile.in.orig > gcc/Makefile.in</userinput></screen>
|
---|
| 83 |
|
---|
| 84 | <para os="ch">Use our cross-complier instead of the one GCC builds, named
|
---|
| 85 | <command>xgcc</command>:</para>
|
---|
| 86 |
|
---|
| 87 | <screen os="ci"><userinput>cp gcc/mklibgcc.in{,.orig}
|
---|
| 88 | sed -e "s@\./xgcc@/cross-tools/bin/${CC}@g" \
|
---|
| 89 | gcc/mklibgcc.in.orig > gcc/mklibgcc.in</userinput></screen>
|
---|
| 90 |
|
---|
| 91 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 92 | href="../../cross-tools/x86/gcc-static.xml"
|
---|
| 93 | xpointer="xpointer(//*[@os='ak'])"/>
|
---|
| 94 |
|
---|
| 95 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 96 | href="../../final-system/common/gcc.xml"
|
---|
| 97 | xpointer="xpointer(//*[@os='f'])"/>
|
---|
| 98 |
|
---|
| 99 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 100 | href="../../final-system/common/gcc.xml"
|
---|
| 101 | xpointer="xpointer(//*[@os='g'])"/>
|
---|
| 102 |
|
---|
| 103 | <para os="cj">Before starting to build GCC, remember to unset any environment
|
---|
| 104 | variables that override the default optimization flags.</para>
|
---|
| 105 |
|
---|
| 106 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 107 | href="../../final-system/common/gcc.xml"
|
---|
| 108 | xpointer="xpointer(//*[@os='h'])"/>
|
---|
| 109 |
|
---|
| 110 | <screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
|
---|
| 111 | --build=${LFS_HOST} --host=${LFS_TARGET} --target=${LFS_TARGET} \
|
---|
| 112 | --libexecdir=/tools/lib --with-local-prefix=/tools --enable-long-long \
|
---|
| 113 | --enable-c99 --enable-shared --enable-threads=posix --enable-__cxa_atexit \
|
---|
| 114 | --disable-nls --enable-languages=c,c++ --disable-libstdcxx-pch</userinput></screen>
|
---|
| 115 |
|
---|
| 116 | <variablelist os="ck">
|
---|
| 117 | <title>The meaning of the new configure options:</title>
|
---|
| 118 |
|
---|
| 119 | <varlistentry os="ck1">
|
---|
| 120 | <term><parameter>--libexecdir=/tools/lib</parameter></term>
|
---|
| 121 | <listitem>
|
---|
| 122 | <para>This do ...</para>
|
---|
| 123 | </listitem>
|
---|
| 124 | </varlistentry>
|
---|
| 125 |
|
---|
| 126 | <varlistentry os="ck2">
|
---|
| 127 | <term><parameter>--disable-libstdcxx-pch</parameter></term>
|
---|
| 128 | <listitem>
|
---|
| 129 | <para>Do not build the pre-compiled header (PCH) for
|
---|
| 130 | <filename class="libraryfile">libstdc++</filename>. It takes
|
---|
| 131 | up a lot of space, and we have no use for it.</para>
|
---|
| 132 | </listitem>
|
---|
| 133 | </varlistentry>
|
---|
| 134 |
|
---|
| 135 | </variablelist>
|
---|
| 136 |
|
---|
| 137 | <para>Compile the package:</para>
|
---|
| 138 |
|
---|
| 139 | <screen><userinput>make AS_FOR_TARGET="/cross-tools/bin/${LFS_TARGET}-as" \
|
---|
| 140 | LD_FOR_TARGET="/cross-tools/bin/${LFS_TARGET}-ld"</userinput></screen>
|
---|
| 141 |
|
---|
| 142 | <para>Install the package:</para>
|
---|
| 143 |
|
---|
| 144 | <screen><userinput>make install</userinput></screen>
|
---|
| 145 |
|
---|
| 146 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 147 | href="../../final-system/common/gcc.xml"
|
---|
| 148 | xpointer="xpointer(//*[@os='w'])"/>
|
---|
| 149 |
|
---|
| 150 | <screen><userinput>ln -s gcc /tools/bin/cc</userinput></screen>
|
---|
| 151 |
|
---|
| 152 | </sect2>
|
---|
| 153 |
|
---|
| 154 | <sect2 role="content">
|
---|
| 155 | <title/>
|
---|
| 156 |
|
---|
| 157 | <para>Details on this package are located in <xref
|
---|
| 158 | linkend="contents-gcc" role="."/></para>
|
---|
| 159 |
|
---|
| 160 | </sect2>
|
---|
| 161 |
|
---|
| 162 | </sect1>
|
---|