public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Merged GCC and Binutils build directories for bootstrap?
@ 2003-10-17 21:35 Mario Nigrovic; RVVK40
  2003-10-19 14:05 ` Rupert Wood
  0 siblings, 1 reply; 4+ messages in thread
From: Mario Nigrovic; RVVK40 @ 2003-10-17 21:35 UTC (permalink / raw)
  To: gcc-help

Folks -

    I've seen lots of references implying that it's possible to have bootstrap
gcc compile its binutils (gas, ld, etc), but I've searched and searched and
all the docs just say it's possible, not *how* to do it!  I've even tried
looking through configure and Makefile.in, much to my confusion.

    So, I'm hoping this is documented somewhere nice so that someone can just
tell me what an idiot I am for not looking in <PUT_URL_HERE>.  Otherwise, if
someone happens the know the secrets, please share them!

					Mario
-- 
Whoever fights monsters should see  |
to it that in the process he does   |
not become a monster.  -- Nietzsche |

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

* RE: Merged GCC and Binutils build directories for bootstrap?
  2003-10-17 21:35 Merged GCC and Binutils build directories for bootstrap? Mario Nigrovic; RVVK40
@ 2003-10-19 14:05 ` Rupert Wood
  2003-10-23 21:24   ` Mario Nigrovic; RVVK40
  0 siblings, 1 reply; 4+ messages in thread
From: Rupert Wood @ 2003-10-19 14:05 UTC (permalink / raw)
  To: 'Mario Nigrovic; RVVK40'; +Cc: gcc-help

Mario Nigrovic wrote:

> I've seen lots of references implying that it's possible to have
> bootstrap gcc compile its binutils (gas, ld, etc), but I've
> searched and searched and all the docs just say it's possible, not
> *how* to do it!

It gets a mention in the simulator test instructions, 

    http://gcc.gnu.org/simtest-howto.html 

The basic idea is to note that the root of gcc, gdb, binutils, etc. tarballs
is all approximately the same, as are a few of the subdirectories
(libiberty, include, etc.) In fact binutils and gdb come from the same CVS;
virtually all of sources apart from gcc do. I think the combined tree is
called the "Cygnus toolchain".

You have to make sure the gcc, binutils, etc. that you're combining are
about the same age so one will build with the other one's libiberty and
includes. Then you need to decide which tree's libiberty and include you're
going to use - I forget which one's officially canonical. Then you can
either make hard links with cpio as in the simtest howto or you could
symlink the gcc, bohem-gc and runtime lib directories into the binutils
source tree, or the bfd, binutils, gas, ld, opcodes, etc. directories into
the binutils tree. Finally, you should be able to configure and build from
the combined tree.

However, I don't think this offers any benefit over building then installing
the binutils and then building and installing GCC for a target, especially
if you're going to update the GCC more often than the binutils.

You may find more / better instructions in the CrossGCC FAQ.

Good luck,
Rup.

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

* Re: Merged GCC and Binutils build directories for bootstrap?
  2003-10-19 14:05 ` Rupert Wood
@ 2003-10-23 21:24   ` Mario Nigrovic; RVVK40
  2003-10-24 11:08     ` Rupert Wood
  0 siblings, 1 reply; 4+ messages in thread
From: Mario Nigrovic; RVVK40 @ 2003-10-23 21:24 UTC (permalink / raw)
  To: Rupert Wood; +Cc: gcc-help

Hello, again...

    So it seems that, contrary to the howto, the GCC libiberty is not a superset
of the binutils version, which sort of makes this whole merged build kinda a
bad idea.  In particular, binutils fails because lrealpath is not in gcc's
version (even 3.3.2).

    The point of merging these trees, I thought, was to do a nice clean
bootstrap.  Otherwise you have to either do the whole compile twice (ick!)
or build your final gcc with a binutils built with the older gcc (or other
compiler).

    Does anyone have any insight into the long-term prospect for merged
bootstrap installs?  If they're not possible, then what's the proper way to
handle this?

-- Mario

Rupert Wood wrote:
> Mario Nigrovic wrote:
> 
> 
>>I've seen lots of references implying that it's possible to have
>>bootstrap gcc compile its binutils (gas, ld, etc), but I've
>>searched and searched and all the docs just say it's possible, not
>>*how* to do it!
> 
> 
> It gets a mention in the simulator test instructions, 
> 
>     http://gcc.gnu.org/simtest-howto.html 
> 
> The basic idea is to note that the root of gcc, gdb, binutils, etc. tarballs
> is all approximately the same, as are a few of the subdirectories
> (libiberty, include, etc.) In fact binutils and gdb come from the same CVS;
> virtually all of sources apart from gcc do. I think the combined tree is
> called the "Cygnus toolchain".
> 
> You have to make sure the gcc, binutils, etc. that you're combining are
> about the same age so one will build with the other one's libiberty and
> includes. Then you need to decide which tree's libiberty and include you're
> going to use - I forget which one's officially canonical. Then you can
> either make hard links with cpio as in the simtest howto or you could
> symlink the gcc, bohem-gc and runtime lib directories into the binutils
> source tree, or the bfd, binutils, gas, ld, opcodes, etc. directories into
> the binutils tree. Finally, you should be able to configure and build from
> the combined tree.
> 
> However, I don't think this offers any benefit over building then installing
> the binutils and then building and installing GCC for a target, especially
> if you're going to update the GCC more often than the binutils.
> 
> You may find more / better instructions in the CrossGCC FAQ.
> 
> Good luck,
> Rup.

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

* RE: Merged GCC and Binutils build directories for bootstrap?
  2003-10-23 21:24   ` Mario Nigrovic; RVVK40
@ 2003-10-24 11:08     ` Rupert Wood
  0 siblings, 0 replies; 4+ messages in thread
From: Rupert Wood @ 2003-10-24 11:08 UTC (permalink / raw)
  To: 'Mario Nigrovic; RVVK40'; +Cc: gcc-help

Mario Nigrovic wrote:

> So it seems that, contrary to the howto, the GCC libiberty is not a
> superset of the binutils version, which sort of makes this whole
> merged build kinda a bad idea.  In particular, binutils fails
> because lrealpath is not in gcc's version (even 3.3.2).

It depends on the versions you try and merge. The current libiberty at the
head of GCC's CVS tree is identical to the one at binutil's head of CVS
tree. It's possible that the libiberty was never updated on the
gcc-3_3-branch, i.e. it'd be the same as the libibery in the binutils
version from whenever the gcc-3_3-branch was created.

You could always try and build GCC 3.3.2 with the newer libiberty from the
binutils you're using?

> The point of merging these trees, I thought, was to do a nice clean
> bootstrap.  Otherwise you have to either do the whole compile twice
> (ick!) or build your final gcc with a binutils built with the older
> gcc (or other compiler).

I don't think the combined tree will 'bootstrap' the binutils in the same
way as it does GCC - I think you just get them built once with your current
compiler and it only does the three stages for GCC. I know that cygnus
themselves used to three-stage everything but I don't think this is default
for the combined tree.

Rup.

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

end of thread, other threads:[~2003-10-24 11:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-17 21:35 Merged GCC and Binutils build directories for bootstrap? Mario Nigrovic; RVVK40
2003-10-19 14:05 ` Rupert Wood
2003-10-23 21:24   ` Mario Nigrovic; RVVK40
2003-10-24 11:08     ` Rupert Wood

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).