From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Nieuwenhuizen Subject: Re: [PATCH v5 01/10] gnu: cross: Use CROSS_*_INCLUDE_PATH for system headers. Date: Wed, 27 Apr 2016 08:57:14 +0200 Message-ID: <87h9en8rp1.fsf@drakenvlieg.flower> References: <87lh4080wu.fsf@drakenvlieg.flower> <20160426221537.10eccb14@openmailbox.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]:57573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avJPi-0002sx-KS for guix-devel@gnu.org; Wed, 27 Apr 2016 02:57:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avJPe-0005ml-IC for guix-devel@gnu.org; Wed, 27 Apr 2016 02:57:34 -0400 In-Reply-To: <20160426221537.10eccb14@openmailbox.org> (Eric Bavier's message of "Tue, 26 Apr 2016 22:15:37 -0500") 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: Eric Bavier Cc: guix-devel@gnu.org Eric Bavier writes: >> * gnu/packages/patches/gcc-cross-environment-variables.patch: Also use C= ROSS_ >> variants: CROSS_C_INCLUDE_PATH, CROSS_CPLUS_INCLUDE_PATH, >> CROSS_OBJC_INCLUDE_PATH, CROSS_OBJCPLUS_INCLUDE_PATH to be used for sy= stem >> libraries, see > We've started following the Changelog conventions more closely lately, > notably the lack of indentation spacing on newlines. Ah that's good; I've been hand-editing this >> - (setenv "CROSS_CPATH" >> - (string-append libc "/include:" >> - linux "/include")) >> + (let ((cpath (string-append >> + libc "/include" >> + ":" linux "/include"))) > > I prefer the old alignment of the string-append (nitpick). You cannot mean like this (let ((cpath (string-append libc "/include" ":" libc "/i686-w64-mi= ngw32/include"))) ...that's 92 characters, how would you do it? >> + (and-let* ((value (getenv var)) >> + (path (search-path-as-string= ->list >> + value)) >> + (native-path >> + (list->search-path-as-string >> + (remove cross? path) ":"))) >> + (setenv var native-path))) >> + '("C_INCLUDE_PATH" >> + "CPLUS_INCLUDE_PATH" >> + "OBJC_INCLUDE_PATH" >> + "OBJCPLUS_INCLUDE_PATH" >> + "LIBRARY_PATH")))) >> + ,phases)) >> + (else phases)))))))) > > The phase overall should result in a boolean, but the for-each here > returns undefined. There has been sentiment around here to avoid > and-let* where possibly; 'and=3D>' should work nicely in this case, since > there's only a single application that could return #f. Ok; changed to (for-each (lambda (var) (and=3D> (getenv var) (lambda (value) (let* ((path (search-path-as-string->list value)) (native-path (list->search-path-as-string (remove cross? path) ":"))) (setenv var native-path))))) '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" "OBJC_INCLUDE_PATH" "OBJCPLUS_INCLUDE_PATH" "LIBRARY_PATH")) and added a #t >> (define (cross-gcc-patches target) >> "Return GCC patches needed for TARGET." >> @@ -228,6 +234,7 @@ GCC that does not target a libc; otherwise, target t= hat libc." >> `(#:implicit-inputs? #f >> #:modules ((guix build gnu-build-system) >> (guix build utils) >> + (ice-9 and-let-star) > > Based on the module added above, did you mean to use and-let* here? Ah, yes I'm using that in 0004-gnu-cross-build-i686-w64-mingw32-new-cross-target.patch; removed. I'll have a look at removing and-let* there too. Thanks! Greetings, Jan --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.nl= =20=20