[Top][All Lists]

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

Re: gcc: build all languages at once?

From: Ludovic Courtès
Subject: Re: gcc: build all languages at once?
Date: Wed, 08 Sep 2021 23:08:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hi Sarah,

Sarah Morgensen <> skribis:

> I notice that out of GCC's supported languages (ada, c, c++, d, fortran,
> go, jit, lto, objc, obj-c++) we currently build all except ada, and five
> of them (d, fortran, go, objc, and obj-c++) are built separately.  Most
> of GCC's build time is spent bootstrapping and building the actual
> compiler, rather than building the frontends, so we would save a lot of
> build time by building them all together.

Yes, but at the expense of the build time of the main GCC package and of
its size.

> We could also possibly reuse the 'core' parts of GCC between language
> frontends, saving some space.  (This is what distros seem to do.)

That’d be ideal, but I’m not sure it’s feasible.  It’s feasible for FHS
distros that “just” need to shuffle files around in various binary
packages, but here we’d have to have several outputs or something, and
most likely they’d refer to one another.

> If we do this, I'm not sure whether it would be better to have each
> additional language as an output for gcc, or as a separate package.
> Currently, the only build-time difference between our GCC packages is
> that our package for 'jit' uses '--enable-host-shared', which
> "[specifies] that the host code should be built into
> position-independent machine code (with -fPIC), allowing it to be used
> within shared libraries, but yielding a slightly slower compiler" [0].
> I don't think it would be too big of a hit to just turn that on
> unconditionally, but we could also keep 'jit' as a separately-built
> package.

Yeah, dunno.

> What do you all think?

There’s definitely room for improvement in this area, but it’s not clear
to me what can be done within the constraints that we have, in
particular the closure size of gcc (gcc:lib in particular) and having a
reasonably small set of dependencies for ‘gcc-final’.  I suppose
experimentation could tell us which approach to follow!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]