unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Carl Dong <contact@carldong.me>
To: Marius Bakke <mbakke@fastmail.com>
Cc: "36346@debbugs.gnu.org" <36346@debbugs.gnu.org>
Subject: [bug#36346] [PATCH] gnu: Allow building toolchain with non-default libc.
Date: Sun, 07 Jul 2019 14:42:24 +0000	[thread overview]
Message-ID: <XSh8JydMVmKk7r7WAaJ3J-hdycb_Q8veLjOhopkAeF7W4qki242hKCiIkx8dc-Yo_P1U7wjsn_dxpdFT5-CSxxhCPQy226KfugUs6su9SBU=@carldong.me> (raw)
In-Reply-To: <87y31cqeu7.fsf@devup.no>

Hi Marius!

> It would be easier to digest this patch if it came with an actual user of this
> change. Right now it complicates a very simple procedure for no apparent
> reason. Can you elaborate a bit on the use case?

Ah! This change is motivated by the work I've been doing in shifting the Bitcoin
release process to a Guix-based one. The binaries we produce aim to be
compatible with GLIBC_2_11, and we have glibc compat wrappers
(https://github.com/bitcoin/bitcoin/blob/f373beebbcc0c7d1160e02dc638a00b3e6831d98/src/compat/glibc_compat.cpp)
all the way up to 2.27 (since we need RISCV support). With Guix, I hope that we
don't have to keep updating compat wrappers anymore, and pin our toolchain glibc
version to a fixed one. See here for how I use this:
https://github.com/bitcoin/bitcoin/blob/e8dd4da0b287e0fe252c99bb4a7cb26c2e947b71/contrib/guix/packages/gcc-bitcoin.scm#L91

> Guix excels at creating bespoke toolchains like these. It is easy to express
> this change as a new 'make-gcc-toolchain-with-custom-libc' procedure. So I'm
> not sure if it's worth changing 'make-gcc-toolchain', which serves a fairly
> specific use case.
>
> I would expect any reasonably complex toolchain to need further tweaks, and we
> cannot possibly support all such configuration inside 'make-gcc-toolchain'.
>
> It does sound useful to make these procedures more generally accessible
> however. Perhaps 'make-gcc-toolchain' could be implemented in terms of a more
> generic 'make-toolchain' interface?

That all sound like promising solutions. My thought process comes from porting
riscv64 to Guix, where I realized that I had to override the default gcc version
(riscv64 requires gcc 7.1), glibc version (2.27), and kernel headers version
(4.15). That makes me think that the sensible list of things to be overridable
for a toolchain would be those three, in case of future architectures. I've
submitted previous patches to cross-base.scm that added the ability to
parameterize these three, and this patch was simply doing the same for
gcc-toolchain.

Anyway, please let me know which approach you'd prefer, and I'd be very happy to
implement and change. :-)


Cheers,
Carl Dong
contact@carldong.me
"I fight for the users"

  reply	other threads:[~2019-07-07 14:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-23 20:15 [bug#36346] [PATCH] gnu: Allow building toolchain with non-default libc Carl Dong
2019-07-05 22:46 ` Marius Bakke
2019-07-07 14:42   ` Carl Dong [this message]
2019-07-08 15:34     ` Marius Bakke
2019-07-08 19:41 ` Carl Dong

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to='XSh8JydMVmKk7r7WAaJ3J-hdycb_Q8veLjOhopkAeF7W4qki242hKCiIkx8dc-Yo_P1U7wjsn_dxpdFT5-CSxxhCPQy226KfugUs6su9SBU=@carldong.me' \
    --to=contact@carldong.me \
    --cc=36346@debbugs.gnu.org \
    --cc=mbakke@fastmail.com \
    /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 public inbox

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

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