[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add libiberty.
From: |
Ricardo Wurmus |
Subject: |
Re: [PATCH] Add libiberty. |
Date: |
Mon, 29 Jun 2015 10:47:13 +0200 |
>> 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