This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc will not build


>Having said that, a patch for the docs to address this issue would
>probably be accepted :-)

Well here it is, the mystery of the magical bootstrap explained, for those
of us who need to know:

--- /hdc2/tmp/gcc-2.95.2/install/build.html	Mon Oct 25 01:02:12 1999
+++ build.html	Tue Mar 28 14:15:38 2000
@@ -58,6 +58,39 @@
 that re-defining LANGUAGES when calling `<code>make bootstrap</code>'
 <b>*does not*</b> work anymore!
 
+<p>`<code>make bootstrap</code>' may fail if your system isn't
+configured in a standard way.  In that case, just `<code>make</code>'
+may still work.  Here's why:
+
+<p>The bootstrap build works as follows: First, `<code>make
+bootstrap</code>' builds the compiler using the compiler that is
+already installed on your system.  The result is called the "stage1"
+compiler.  Then, without installing it or configuring it for your
+system, it uses the stage1 compiler to build the compiler again.  This
+is the "stage2" compiler.  Then it builds the compiler yet again,
+using the stage2 compiler, which still is not installed, to produce
+the "stage3" compiler.  Finally, `<code>make bootstrap</code>'
+compares the stage2 and stage3 compilers, and if they are not
+identical reports an error (because the compiler is apparently
+broken).  Besides detecting errors, this ensures that you're using a
+compiler which itself was built with the best compiler available.
+
+<p>Because the stage1 and stage2 compilers never get installed, you
+don't have the chance to set up the proper environment for them to
+work.  For example, you can't tell them where your C library is.  This
+is not normally a problem, because in most installations things like
+the C library location are standard and the compiler knows them by
+default.  But if your system doesn't fit these defaults, `<code>make
+bootstrap</code>' will fail.
+
+<p>The way around this is to do a more primitive build: Use plain
+`<code>make</code>' to create the stage1 compiler, and then
+'<code>make install</code>' to install that, and then whatever else
+you need to complete the install (editing the specs file, setting
+environment variables, etc.) on your system.  Then, go ahead and
+repeat the build and install twice.  Do the comparison, and then
+discard the stage1 and stage2 compilers.
+
 
 <h2>Building a cross compiler</h2>
 

-- 
Bryan Henderson                                    Phone 415-505-3367
Olympia, Washington

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]