Re: GCC build from source. Where does a build of GCC, put the "gcc" executable???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 21 Feb 2024 at 00:18, gemesys--- via Gcc-help
<gcc-help@xxxxxxxxxxx> 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



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux