From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH] Add libiberty. Date: Mon, 29 Jun 2015 10:47:13 +0200 Message-ID: References: <871tgxzdji.fsf@elephly.net> <87y4j4xkw5.fsf@gnu.org> <87lhf4xgxg.fsf@elephly.net> <87d20ftwbz.fsf@gnu.org> <87h9prxc48.fsf@elephly.net> <87fv5ark1d.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9Uj0-00062P-N6 for guix-devel@gnu.org; Mon, 29 Jun 2015 04:47:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9Uiw-00085N-MJ for guix-devel@gnu.org; Mon, 29 Jun 2015 04:47:34 -0400 In-Reply-To: <87fv5ark1d.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: Guix-devel >> Following the GCC version automatically dependent on whatever value th= e >> 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=E2=80=99t get it. If we use =E2=80=98gcc=E2=80=99 instead of =E2= =80=98gcc-4.8=E2=80=99, it doesn=E2=80=99t work, > because =E2=80=98gcc=E2=80=99 is currently an alias for =E2=80=98gcc-4.= 9=E2=80=99. What do you mean by "it doesn't work"? I'm not seeing any problem. > This is why I suggested using =E2=80=98gcc-4.8=E2=80=99 explicitly: We = know it=E2=80=99s 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