public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* GCC build from source.  Where does a build of GCC, put the "gcc" executable???
@ 2024-02-20 23:31 gemesys
  2024-02-21  0:20 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: gemesys @ 2024-02-20 23:31 UTC (permalink / raw)
  To: gcc-help; +Cc: gemesys

Hi;
For various reasons, I needed to build a GCC 4.8.5 compiler
from the source tarball.  I did this, using gcc version 4.3 and
looks like it worked.

(any one reading, can jump to TL;DR at end...)

Before I run "make install", I just want to run the just-made
"gcc" executable file, with "./gcc --version" just to confirm
the darn thing actually got built successfully and might
actually work.

I built in the "gcc-4.8.5" source directory. Why?  Because this
worked on two other vintage 32-bit machines.  The build has
completed - I have several "xxx-i686-pc-linux-gnu" directories,
and numerous object library directories, and several sub-dirs
called "gcc" - some of which have .c code, and some of which
contain object files - but none of these actually have THE NEEDED
GCC EXECUTABLE FILE!  This is hilarious.  Doing this exercise is
like an old game of "Dungeons and Dragons"  ("You are in a dark place,
with many dark, twisty dimly-lit possible passages...")

I have read the documenation on BUilding GCC from Source, and that
is how I got it all to work.

Now - please:  Where oh where does this GCC build put the gosh-darn
"gcc" program and the other related executable files?  (g++, F95, etc.)

In /home/gcc/gcc-4.8.5/host-i686-pc-linux-gnu/gcc I have F951, and
files which appears to runable, and I have two
things called: "xgcc" and "xg++" which maybe are gcc and g++ after
the "make install" is run?

I had to build with the curious triple-check bootstrap thing
disabled, since I was running out of disk space (also hilarious).

But the "make -disable-bootstrap" ran successfully to completion.

I just want to inspect the built "gcc" program, confirm it is
the correct new one, and actually works, before I run the
"make install" to fling everything into "/usr/local...", as
per CentOS/Fedora/Redhat style Linux.

So - what is the secret?  Does "xgcc" and "xg++" magically
turn into "gcc" and "g++" and find their way into /usr/local/bin
(as per Redhat Linux typical installs)?

Does "GCC Build from Source" not actually create a  "gcc"?
I suspect this is the simple answer - but after a
silly amount of google-time-waste and read/read/read of
documents - I remain in the dark.  :(

- Mark Langdon,
  Proprietor,
  Lorcalon Farm (where we BUILD our own TOOLS!) and
  Owner, GEMESYS Ltd.

PS and
TL;DR
(After more detailed examination of things, I am guessing
that it is the "make install" step that creates the "gcc"
in /usr/local/bin.  Is that correct?)
Thanx for any info, anyone might want to fling my way!
-M

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: GCC build from source. Where does a build of GCC, put the "gcc" executable???
  2024-02-20 23:31 GCC build from source. Where does a build of GCC, put the "gcc" executable??? gemesys
@ 2024-02-21  0:20 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2024-02-21  0:20 UTC (permalink / raw)
  To: gemesys; +Cc: gcc-help

On Wed, 21 Feb 2024 at 00:18, gemesys--- via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> Hi;
> For various reasons, I needed to build a GCC 4.8.5 compiler
> from the source tarball.  I did this, using gcc version 4.3 and
> looks like it worked.
>
> (any one reading, can jump to TL;DR at end...)
>
> Before I run "make install", I just want to run the just-made
> "gcc" executable file, with "./gcc --version" just to confirm
> the darn thing actually got built successfully and might
> actually work.
>
> I built in the "gcc-4.8.5" source directory. Why?  Because this
> worked on two other vintage 32-bit machines.  The build has
> completed - I have several "xxx-i686-pc-linux-gnu" directories,
> and numerous object library directories, and several sub-dirs
> called "gcc" - some of which have .c code, and some of which
> contain object files - but none of these actually have THE NEEDED
> GCC EXECUTABLE FILE!  This is hilarious.  Doing this exercise is
> like an old game of "Dungeons and Dragons"  ("You are in a dark place,
> with many dark, twisty dimly-lit possible passages...")
>
> I have read the documenation on BUilding GCC from Source, and that
> is how I got it all to work.
>
> Now - please:  Where oh where does this GCC build put the gosh-darn
> "gcc" program and the other related executable files?  (g++, F95, etc.)
>
> In /home/gcc/gcc-4.8.5/host-i686-pc-linux-gnu/gcc I have F951, and
> files which appears to runable, and I have two
> things called: "xgcc" and "xg++" which maybe are gcc and g++ after
> the "make install" is run?

Yes, they get renamed when installed. xgcc is what you're looking for.


>
> I had to build with the curious triple-check bootstrap thing
> disabled, since I was running out of disk space (also hilarious).
>
> But the "make -disable-bootstrap" ran successfully to completion.
>
> I just want to inspect the built "gcc" program, confirm it is
> the correct new one, and actually works, before I run the
> "make install" to fling everything into "/usr/local...", as
> per CentOS/Fedora/Redhat style Linux.

You could always do make install DESTDIR=/some/where/else to see what
would be installed.

>
> So - what is the secret?  Does "xgcc" and "xg++" magically
> turn into "gcc" and "g++" and find their way into /usr/local/bin
> (as per Redhat Linux typical installs)?

Not magically, just using shell commands.

>
> Does "GCC Build from Source" not actually create a  "gcc"?
> I suspect this is the simple answer - but after a
> silly amount of google-time-waste and read/read/read of
> documents - I remain in the dark.  :(
>
> - Mark Langdon,
>   Proprietor,
>   Lorcalon Farm (where we BUILD our own TOOLS!) and
>   Owner, GEMESYS Ltd.
>
> PS and
> TL;DR
> (After more detailed examination of things, I am guessing
> that it is the "make install" step that creates the "gcc"
> in /usr/local/bin.  Is that correct?)
> Thanx for any info, anyone might want to fling my way!
> -M

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-21  0:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-20 23:31 GCC build from source. Where does a build of GCC, put the "gcc" executable??? gemesys
2024-02-21  0:20 ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).