On 2/28/07, Matthew Burgess <[EMAIL PROTECTED]> wrote:
On Wednesday 28 February 2007 18:16, Dan Nicholson wrote:
> In gcc-2.95.3, if you pass -B and it's not
> needed for anything, it will issue a warning on stderr
In which case, I'd say just bump the GCC version requirement.
Attached is a diff which adds -B/usr/bin/ for the configure statements
for binutils-pass1 and gcc-pass1. For binutils, the -B/usr/bin/ isn't
strictly needed until after `make install' since an alternate ld
doesn't exist yet. However, there's no harm in setting it immediately,
and then the preferred way to call gcc is recorded in the Makefile.
I built gcc-pass1 a few times with different options. This seems to be
doing the right thing (Greg said the same). /tools/bin/ld is used for
the feature tests, but /usr/bin/ld is set as LD in the Makefile. This
LD is used to build xgcc and the stage1 gcc of the bootstrap. After
that, a wrapper script executing /tools/i686-pc-linux-gnu is called
for stage2 and stage3.
One difference between LFS and DIY is that DIY adds
--with-ld=/tools/bin/ld. AFAICT, this only affects the default linker
recorded in gcc and collect2. It also means /tools/bin/ld is called
from the wrapper script mentioned above. This could be nice, but
doesn't appear to affect this situation.
So, I think the attached patch should work on all hosts and have no
effect on the purity of the bootstrap. But, someone on a Fedora host
needs to check this out. Anyone got an FC6 partition?
--
Dan
Index: chapter05/gcc-pass1.xml
===================================================================
--- chapter05/gcc-pass1.xml (revision 7952)
+++ chapter05/gcc-pass1.xml (working copy)
@@ -45,7 +45,7 @@
<para>Prepare GCC for compilation:</para>
-<screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
+<screen><userinput>CC="gcc -B/usr/bin/" ../gcc-&gcc-version;/configure --prefix=/tools \
--with-local-prefix=/tools --disable-nls --enable-shared \
--enable-languages=c</userinput></screen>
@@ -53,6 +53,17 @@
<title>The meaning of the configure options:</title>
<varlistentry>
+ <term><envar>CC="gcc -B/usr/bin/"</envar></term>
+ <listitem>
+ <para>This forces <command>gcc</command> to prefer the linker from
+ the host in <filename class="directory">/usr/bin</filename>. This
+ is necessary on some hosts where the new <command>ld</command>
+ built in the previous section is not compatible with the host's
+ <command>gcc</command>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><parameter>--with-local-prefix=/tools</parameter></term>
<listitem>
<para>The purpose of this switch is to remove <filename
Index: chapter05/binutils-pass1.xml
===================================================================
--- chapter05/binutils-pass1.xml (revision 7952)
+++ chapter05/binutils-pass1.xml (working copy)
@@ -59,12 +59,23 @@
<para>Now prepare Binutils for compilation:</para>
-<screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools --disable-nls</userinput></screen>
+<screen><userinput>CC="gcc -B/usr/bin/" ../binutils-&binutils-version;/configure --prefix=/tools --disable-nls</userinput></screen>
<variablelist>
<title>The meaning of the configure options:</title>
<varlistentry>
+ <term><envar>CC="gcc -B/usr/bin/"</envar></term>
+ <listitem>
+ <para>This forces <command>gcc</command> to prefer the linker from
+ the host in <filename class="directory">/usr/bin</filename>. This
+ is necessary on some hosts where the new <command>ld</command>
+ built here is not compatible with the host's <command>gcc</command>
+ .</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><parameter>--prefix=/tools</parameter></term>
<listitem>
<para>This tells the configure script to prepare to install the
Index: prologue/hostreqs.xml
===================================================================
--- prologue/hostreqs.xml (revision 7952)
+++ prologue/hostreqs.xml (working copy)
@@ -56,7 +56,9 @@
</listitem>
<listitem>
- <para><emphasis role="strong">Gcc-2.95.3</emphasis> (Versions
+ <!-- Gcc-2.95.3 breaks feature tests when using CC="gcc -B/usr/bin/"
+ in the *-pass1 sections -->
+ <para><emphasis role="strong">Gcc-3.0.1</emphasis> (Versions
greater than &gcc-version; are not recommended as they have not
been tested)</para>
</listitem>
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page