public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Native build that hopefully works!!
@ 2021-12-05 22:44 Bill Cunningham
  2021-12-06 11:42 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Bill Cunningham @ 2021-12-05 22:44 UTC (permalink / raw)
  To: gcc-help

I just wanted to share what I have been working on. I have of course my 
system gcc and binutils. I compiled a binutils for this new test 
compiler, which seemed to compile. This is all a native build. I used 
the switch --with-build-time-tools and set that to the directory with 
the new binutils. The makefile wanted a path for headers including 
stdio.h, so I created a soft link to the system compiler's headers. I 
would like to have a separate glibc, but that's another topic. Two 
compilers is what really matters.

     I used also --disable-bootstrap and disabled multilib and nls. So I 
believe this gcc is using some symbols from the system compiler and the 
binutils are too. I suppose this really doesn't matter. So changing the 
environment variables should let me be able to use this compiler.

B



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

* Re: Native build that hopefully works!!
  2021-12-05 22:44 Native build that hopefully works!! Bill Cunningham
@ 2021-12-06 11:42 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2021-12-06 11:42 UTC (permalink / raw)
  To: Bill Cunningham; +Cc: gcc-help

On Sun, 5 Dec 2021 at 22:52, Bill Cunningham via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> I just wanted to share what I have been working on. I have of course my
> system gcc and binutils. I compiled a binutils for this new test
> compiler, which seemed to compile. This is all a native build. I used
> the switch --with-build-time-tools and set that to the directory with
> the new binutils. The makefile wanted a path for headers including
> stdio.h, so I created a soft link to the system compiler's headers. I
> would like to have a separate glibc, but that's another topic. Two
> compilers is what really matters.
>
>      I used also --disable-bootstrap and disabled multilib and nls. So I
> believe this gcc is using some symbols from the system compiler and the
> binutils are too. I suppose this really doesn't matter. So changing the
> environment variables should let me be able to use this compiler.

If that's all you've been trying to achieve, it's trivial.

Configure binutils with --prefix=$SOMEWHERE then make && make install.

Configure gcc with --prefix=$SOMEWHERE then make && make install.

Just use the same $SOMEWHERE for binutils and gcc.

Then you can just run $SOMEWHERE/bin/gcc to use it, or add
$SOMEWHERE/bin to the start of your PATH to make it the default.

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

end of thread, other threads:[~2021-12-06 11:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-05 22:44 Native build that hopefully works!! Bill Cunningham
2021-12-06 11:42 ` 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).