r5376 - in branches/cross-lfs/BOOK: cross-tools cross-tools/raq2 introduction/raq2

jim at linuxfromscratch.org jim at linuxfromscratch.org
Thu May 19 20:09:15 PDT 2005


Author: jim
Date: 2005-05-19 21:09:14 -0600 (Thu, 19 May 2005)
New Revision: 5376

Added:
   branches/cross-lfs/BOOK/cross-tools/raq2/gcc-no-threads.xml
Modified:
   branches/cross-lfs/BOOK/cross-tools/raq2-chapter.xml
   branches/cross-lfs/BOOK/cross-tools/raq2/glibc-headers.xml
   branches/cross-lfs/BOOK/introduction/raq2/changelog.xml
Log:
Fixed RaQ2 wierdness

Added: branches/cross-lfs/BOOK/cross-tools/raq2/gcc-no-threads.xml
===================================================================
--- branches/cross-lfs/BOOK/cross-tools/raq2/gcc-no-threads.xml	2005-05-19 20:40:15 UTC (rev 5375)
+++ branches/cross-lfs/BOOK/cross-tools/raq2/gcc-no-threads.xml	2005-05-20 03:09:14 UTC (rev 5376)
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../../general.ent">
+  <!ENTITY % patches-entities SYSTEM "../../patches.ent">
+  %general-entities;
+  %patches-entities;
+]>
+
+<sect1 id="ch-cross-tools-gcc-no-threads" role="wrap">
+<title>Cross GCC-&gcc-version; - Static libgcc - No Threads</title>
+<?dbhtml filename="gcc-no-threads.html"?>
+
+<indexterm zone="ch-cross-tools-gcc-no-threads">
+<primary sortas="a-GCC">GCC</primary>
+<secondary>cross tools, static libgcc - no threads</secondary></indexterm>
+
+<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../../final-system/common/gcc.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+<segmentedlist>
+<segtitle>&buildtime;</segtitle>
+<segtitle>&diskspace;</segtitle>
+<seglistitem><seg>4.4 SBU</seg><seg>300 MB</seg></seglistitem>
+</segmentedlist>
+
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../../final-system/common/gcc.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
+</sect2>
+
+<sect2 role="installation">
+<title>Installation of Cross GCC Compiler with Static libgcc</title>
+
+<para>We will make a couple of essential adjustments to the specs file to point
+to use our build environment:</para>
+
+<screen><userinput>patch -Np1 -i ../&gcc-specs-patch;</userinput></screen>
+
+<para>To make sure that we use the proper syntax for a couple of tools, we apply
+the following patch:</para>
+
+<screen><userinput>patch -Np1 -i ../&gcc-posix-patch;</userinput></screen>
+
+<para>Now we will need to setup our StartFile Spec to the correct library
+location:</para>
+
+<screen><userinput>echo "
+#undef STARTFILE_PREFIX_SPEC
+#define STARTFILE_PREFIX_SPEC \"/tools/lib/\"" >> gcc/config/linux.h</userinput></screen>
+
+<para>Now we will change gcc's search path to look into /tools only:</para>
+
+<screen><userinput>sed -i "s@\(^CROSS_SYSTEM_HEADER_DIR =\).*@\1 /tools/include at g" \
+   gcc/Makefile.in</userinput></screen>
+
+<important><para>The above patches and sed's are critical in ensuring a
+successful overall build. Do not forget to apply them.</para></important>
+
+<para>The GCC documentation recommends building GCC outside of the
+source directory in a dedicated build directory:</para>
+
+<screen><userinput>mkdir ../gcc-build
+cd ../gcc-build</userinput></screen>
+
+<para>Prepare GCC for compilation:</para>
+
+<screen><userinput>../gcc-&gcc-version;/configure --prefix=/cross-tools \
+    --host=${LFS_HOST} --target=${LFS_TARGET} \
+    --with-local-prefix=/tools --disable-nls --disable-shared \
+    --disable-threads --enable-multilib=no --enable-languages=c</userinput></screen>
+
+<para>The meaning of the configure options:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--with-local-prefix=/tools</parameter></term>
+<listitem><para>The purpose of this switch is to remove <filename class="directory">/usr/local/include</filename>
+from <command>gcc</command>'s include search path. This is not absolutely
+essential, however, it helps to minimize the influence of the host
+system.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--enable-languages=c</parameter></term>
+<listitem><para>This option ensures that only the C compiler is built.
+This option is only needed when you have downloaded and unpacked the
+full GCC tarball, as opposed to just the gcc-core
+tarball.</para></listitem>
+</varlistentry>
+</variablelist>
+
+<para>Continue with compiling the package:</para>
+
+<screen><userinput>make all-gcc</userinput></screen>
+
+<para>Install the package:</para>
+
+<screen><userinput>make install-gcc</userinput></screen>
+
+</sect2>
+
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-gcc" role="."/></para>
+</sect2>
+
+</sect1>
+

Modified: branches/cross-lfs/BOOK/cross-tools/raq2/glibc-headers.xml
===================================================================
--- branches/cross-lfs/BOOK/cross-tools/raq2/glibc-headers.xml	2005-05-19 20:40:15 UTC (rev 5375)
+++ branches/cross-lfs/BOOK/cross-tools/raq2/glibc-headers.xml	2005-05-20 03:09:14 UTC (rev 5376)
@@ -53,7 +53,7 @@
 
 <para>Next, prepare Glibc for compilation:</para>
 
-<screen><userinput>CC="${CC-gcc}" ../glibc-&glibc-version;/configure --prefix=/tools \
+<screen><userinput>CC="${LFS_TARGET}-gcc" ../glibc-&glibc-version;/configure --prefix=/tools \
     --host=${LFS_TARGET} --build=${LFS_HOST} --without-cvs \
     --disable-sanity-checks --enable-kernel=2.6.0 \
     --with-headers=/tools/include \

Modified: branches/cross-lfs/BOOK/cross-tools/raq2-chapter.xml
===================================================================
--- branches/cross-lfs/BOOK/cross-tools/raq2-chapter.xml	2005-05-19 20:40:15 UTC (rev 5375)
+++ branches/cross-lfs/BOOK/cross-tools/raq2-chapter.xml	2005-05-20 03:09:14 UTC (rev 5376)
@@ -13,6 +13,7 @@
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/variables.xml"/>
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="raq2/linux-libc-headers.xml"/>
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/binutils.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="raq2/gcc-no-threads.xml"/>
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="raq2/glibc-headers.xml"/>
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="raq2/gcc-static.xml"/>
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="raq2/glibc-startfiles.xml"/>

Modified: branches/cross-lfs/BOOK/introduction/raq2/changelog.xml
===================================================================
--- branches/cross-lfs/BOOK/introduction/raq2/changelog.xml	2005-05-19 20:40:15 UTC (rev 5375)
+++ branches/cross-lfs/BOOK/introduction/raq2/changelog.xml	2005-05-20 03:09:14 UTC (rev 5376)
@@ -54,6 +54,7 @@
 <listitem><para>May 19, 2005 [jim]</para>
 <itemizedlist>
 <listitem><para>Updated openssl to 0.97g.</para></listitem>
+<listitem><para>Added gcc no threads build, to fix error during compiling. This may be temporary.</para></listitem>
 </itemizedlist>
 </listitem>
 </itemizedlist>




More information about the lfs-book mailing list