From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 2/5] gnu: gnupg: Fixed cross-compile issues. Date: Sat, 14 Dec 2013 22:06:13 +0100 Message-ID: <8761qrta62.fsf@gnu.org> References: <1387043002-6138-1-git-send-email-john@darrington.wattle.id.au> <1387043002-6138-2-git-send-email-john@darrington.wattle.id.au> <87y53nthwo.fsf@gnu.org> <20131214190218.GA8061@intra> 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]:34610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrwPl-0000ig-LS for guix-devel@gnu.org; Sat, 14 Dec 2013 16:06:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VrwPf-0004ud-Fj for guix-devel@gnu.org; Sat, 14 Dec 2013 16:06:21 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:4763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrwPf-0004uY-95 for guix-devel@gnu.org; Sat, 14 Dec 2013 16:06:15 -0500 In-Reply-To: <20131214190218.GA8061@intra> (John Darrington's message of "Sat, 14 Dec 2013 20:02:18 +0100") 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: John Darrington Cc: guix-devel@gnu.org John Darrington skribis: > On Sat, Dec 14, 2013 at 07:19:03PM +0100, Ludovic Court=C3=A8s wrote: > John Darrington skribis: >=20=20=20=20=20=20 > > *gnu/packages/gnupg.scm (libgpg-error): Added gcc as a native inpu= t, > > and set the CC_FOR_BUILD variable. >=20=20=20=20=20=20 > The implicit inputs when cross-compiling include both the cross-gcc = and > the native gcc (see build-system/gnu.scm.) >=20=20=20=20=20=20 > AFAICS setting CC_FOR_BUILD=3Dgcc should be enough (it uses =E2=80= =98cc=E2=80=99 by > default.) Can you confirm. > > You are right. setting gcc as a native input seems to be unnecessary. S= omewhat on > a tangent: > Would it not be a good idea to have CC_FOR_BUILD=3Dgcc the default sett= ing at least > fot the gnu build-system. Yeah, perhaps we could add that when cross building (we have only two occurrences currently, but it may be needed quite often.) > > *gnu/packages/gnupg.scm (libgcrypt): Added libgpg-error as a nativ= e input and > > set the --with-gpg-error-prefix configure option. >=20=20=20=20=20=20 > This is wrong: libgcrypt would end up linking against the native lib= gpg-error. > > I think you are mistaken. The purpose of --with-gpg-error-prefix=3D is t= o set the path > of the library which it should be linked against. The issue is, that lib= gpg-error provides > both a binary (which must be run at configure time) AND a library which h= as to be linked. Oh indeed, I was unaware of that. So that explains why libgpg-error must be passed both as a native and target input. However, is --with-gpg-error-prefix really needed? By default the cross gcc will find the target libgpg-error in its search path, and not the native one, so I would guess this is OK. Thanks, Ludo=E2=80=99.