gcc and linux newbie's question

Tim Prince n8tm@aol.comnojunk
Tue Dec 21 23:07:00 GMT 1999


>    objdir   /usr/local/bin/gcc-objdir   (currently empty)

Normally, you would build into a directory distinct from the installation
prefix, which would default to /usr/local, however this should work.

>If not, are there any preferred directories to
>hold the "sources" and "objects"?

There are a few packages, such as binutils, which prefer the build directory to
be immediately below the top level source directory.  This works also for
building the compilers, but I believe a totally separate directory is
considered preferable, and would be more convenient in case you must repeat the
unpacking of the distribution.

>I set CC by   export CC=/usr/local/bin/gcc.
>Am I correct?

If that is the compiler you wish to use for the first phase in boot-strapping
the new one.  In a normal linux installation you would not require setting CC,
or (with the same effect) 'export CC=/usr/bin/gcc'

>config.guess
>failed to determine the host type. 

the common choices for gcc-2.95.2 on linux would be i586-pc-linux-gnu (if you
have glibc; makes no difference whether you use i586 or i686) or
i586-pc-linux-gnulibc1 (if you have libc5).  I'm not sure what configure does
to interrogate your system, some combination of uname -a and checking your
library version.  If there were a similar listing among the configure choices
which included k6, you could use that; otherwise I think you need to use one of
the above.  

In your decision, you should consider that the compiler will use a subdirectory
$prefix/lib/gcc-lib/$host/gcc-2.95.2 among others.  If your original compiler
is gcc it should have a similar directory, and by making the $host and $prefix
names match, you can use the version options e.g. -V2.95.2 to select between
them.  linux distributions may be installed with $host as i386-linux,
i586-vendor-linux, or some such.  Making the $host match this way also assures
that the compiler is built starting from the same set of include files, if
there is a directory such as $prefix/$host/include.
Tim Prince
tprince@computer.org


More information about the Gcc-help mailing list