From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] Add libiberty.
Date: Mon, 29 Jun 2015 10:47:13 +0200 [thread overview]
Message-ID: <idjtwtqj3zi.fsf@bimsb-sys02.mdc-berlin.net> (raw)
In-Reply-To: <87fv5ark1d.fsf@gnu.org>
>> Following the GCC version automatically dependent on whatever value the
>> variable "gcc" has is just a bonus to simplify upgrades to the default
>> version of GCC (as the recent move from 4.8 to 4.9).
>
> I don’t get it. If we use ‘gcc’ instead of ‘gcc-4.8’, it doesn’t work,
> because ‘gcc’ is currently an alias for ‘gcc-4.9’.
What do you mean by "it doesn't work"? I'm not seeing any problem.
> This is why I suggested using ‘gcc-4.8’ explicitly: We know it’s the
> last version that installs libiberty.
Maybe it is easier to understand what I mean if I also talk about the
specific case that made me write a libiberty package.
I have a package "powertabeditor" whose executable links with
"libiberty.a". When we were using GCC 4.8 I just had to add
("gcc" ,gcc-4.8 "lib")
as an input. Now that GCC 4.9 is the default, I don't want
"powertabeditor" to depend on the "lib" output of gcc-4.8 anymore. I
also don't want to explicitly ask for GCC 4.8, because I have no problem
using the default GCC. I'm only interested in getting "libiberty.a". I
want the default GCC's version of "libiberty.a".
Alas, the current default (4.9) does not install "libiberty.a". That is
why I wrote the function "make-libiberty" to generate a "libiberty"
package given a certain version of GCC. For "powertabeditor" I just
want to use the current defaults for both GCC and "libiberty.a".
With "gcc" being an alias for "gcc-4.9" (which is the default GCC) and
"libiberty" being generated from the sources of this very same GCC I
have exactly what I wanted.
If I needed a specific version of libiberty, say the one included with
GCC 4.8, I would define libiberty-4.8 such:
(define-public libiberty-4.8
(make-libiberty gcc-4.8))
If I needed the 4.9 version I'd do:
(define-public libiberty-4.9
(make-libiberty gcc-4.9))
This works because all GCC sources include the sources for libiberty
(although only with 4.8 libiberty.a is built and installed).
But if all I want is the version of libiberty that *matches* the current
*default* GCC I'd use the package defined thus:
(define-public libiberty
(make-libiberty gcc))
Does this make any sense?
~~ Ricardo
next prev parent reply other threads:[~2015-06-29 8:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-27 9:49 [PATCH] Add libiberty Ricardo Wurmus
2015-06-28 9:06 ` Ludovic Courtès
2015-06-28 10:31 ` Ricardo Wurmus
2015-06-28 20:24 ` Ludovic Courtès
2015-06-29 6:27 ` Ricardo Wurmus
2015-06-29 8:33 ` Ludovic Courtès
2015-06-29 8:47 ` Ricardo Wurmus [this message]
2015-06-29 12:00 ` Ludovic Courtès
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=idjtwtqj3zi.fsf@bimsb-sys02.mdc-berlin.net \
--to=ricardo.wurmus@mdc-berlin.de \
--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 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).