all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sarah Morgensen <iskarian@mgsn.dev>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: gcc: build all languages at once?
Date: Fri, 10 Sep 2021 12:59:39 -0700	[thread overview]
Message-ID: <86pmtgkxqs.fsf@mgsn.dev> (raw)
In-Reply-To: <87r1dyzsf7.fsf@gnu.org> (message from Ludovic Courtès on Wed, 08 Sep 2021 23:08:44 +0200)

Hi Ludo,

Ludovic Courtès <ludo@gnu.org> writes:

> Hi Sarah,
>
> Sarah Morgensen <iskarian@mgsn.dev> 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.

Its size shouldn't change, as the other languages should be entirely in
separate packages or outputs.  The build time... yeah, that could be
harsh, especially on slower arches.

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

Good point.  I hadn't considered this.

>> 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!

I did some research, and it looks like the Debian GCC build scripts do a
lot of what I am looking for.  They allow building languages and
libraries separately [0], and wow is it complicated!  It looks the gist
is liberal application of --disable-*, especially --disable-bootstrap.

Doing something like this (with each language still built separately,
but without bootstrapping again or building unnecessary libraries)
should be feasible in Guix... with a fair amount of effort.  I'm sure I
don't have the familiarity with GCC to do anything but trial-and-error,
so if anyone else wants to tackle this, have at it :)

[0] https://salsa.debian.org/toolchain-team/gcc/-/blob/master/debian/rules2

--
Sarah


      parent reply	other threads:[~2021-09-10 20:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31 17:43 gcc: build all languages at once? Sarah Morgensen
2021-09-08 21:08 ` Ludovic Courtès
2021-09-09 10:14   ` Maxime Devos
2021-09-10 19:59   ` Sarah Morgensen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86pmtgkxqs.fsf@mgsn.dev \
    --to=iskarian@mgsn.dev \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.