From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH 08/11] gnu: cross-base: Add cross-libtool. Date: Wed, 10 Aug 2016 14:12:28 +0300 Message-ID: <87twesandv.fsf@gmail.com> References: <20160809064139.27872-1-janneke@gnu.org> <20160809064139.27872-9-janneke@gnu.org> <87invacql7.fsf@gmail.com> <87tweuudx4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXRR4-0005zm-W8 for guix-devel@gnu.org; Wed, 10 Aug 2016 07:12:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXRQz-0005Na-Qj for guix-devel@gnu.org; Wed, 10 Aug 2016 07:12:33 -0400 In-Reply-To: <87tweuudx4.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Tue, 09 Aug 2016 18:04:23 +0200") 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" To: Jan Nieuwenhuizen Cc: guix-devel@gnu.org Jan Nieuwenhuizen (2016-08-09 19:04 +0300) wrote: [...] >>> + (for-each (lambda (var) >>> + (and=> (getenv var) >>> + (lambda (value) >>> + (let ((cross >>> + (string-append "CROSS_" var))) >>> + (setenv cross value)) >>> + (unsetenv var)))) >>> + '("C_INCLUDE_PATH" >>> + "CPLUS_INCLUDE_PATH" >>> + "OBJC_INCLUDE_PATH" >>> + "OBJCPLUS_INCLUDE_PATH" >>> + "LIBRARY_PATH")) >> >> I have already seen this list of environment variables in an earlier >> patch. Perhaps it would be reasonable to make some global variable with >> this list and to put it in (guix build utils) or another appropriate >> place, WDYT? > > I have quicke tested the additional patch below which seems to work. It > would need some more testing. How do you like that? I like it very much, the only small thing... > diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm > index f6c30ec..0d36143 100644 > --- a/gnu/packages/cross-base.scm > +++ b/gnu/packages/cross-base.scm > @@ -45,6 +45,15 @@ > ;; be 'gcc' and can be a specific variant such as 'gcc-4.8'. > gcc) > > +(define gcc-include-paths > + '("C_INCLUDE_PATH" > + "CPLUS_INCLUDE_PATH" > + "OBJC_INCLUDE_PATH" > + "OBJCPLUS_INCLUDE_PATH")) > + > +(define gcc-cross-include-paths > + (map (cut string-append "CROSS_" <>) gcc-include-paths)) ... by convention global variables are prefixed with "%" in guix code, i.e.: '%gcc-include-paths' and '%gcc-cross-include-paths'. Perhaps it would be better to have a procedure that transforms usual paths into cross paths instead of '%gcc-cross-include-paths': (define* (paths->cross-paths #:optional (paths %gcc-include-paths)) (map (cut string-append "CROSS_" <>) paths)) or maybe it is not worth bothering. The rest looks good to me, thanks! But again I'm not competent to judge on the matter of this patchset, IIUC Andy is going to handle it, right? -- Alex