From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: GFortran =?utf-8?Q?can=E2=80=99t?= find system headers Date: Thu, 17 Oct 2013 17:29:34 +0200 Message-ID: <8738nzdig1.fsf@gnu.org> References: <87wqlfutme.fsf@karetnikov.org> <87hacijnke.fsf@gnu.org> <87ppr4giie.fsf@karetnikov.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]:34229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWpWA-0000Q7-24 for guix-devel@gnu.org; Thu, 17 Oct 2013 11:29:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VWpW4-0001fW-N4 for guix-devel@gnu.org; Thu, 17 Oct 2013 11:29:41 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:19400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWpW4-0001fQ-Du for guix-devel@gnu.org; Thu, 17 Oct 2013 11:29:36 -0400 In-Reply-To: <87ppr4giie.fsf@karetnikov.org> (Nikita Karetnikov's message of "Thu, 17 Oct 2013 16:59:53 +0400") 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: Nikita Karetnikov Cc: guix-devel@gnu.org Nikita Karetnikov skribis: >> Instead, what should do is preserve the arguments; the value associated >> with #:configure-flags should be changed to replace any >> --enable-languages=3D.* flag with yours. See =E2=80=98gcc-boot0=E2=80= =99 in base.scm for >> how to do that. > > Are you talking about the =E2=80=98substitute-keyword-arguments=E2=80=99 = part? Yes. >> Alternately, you could turn the current =E2=80=98gcc-4.8=E2=80=99 defini= tion into a >> =E2=80=98make-gcc-4.8=E2=80=99 procedure like this: > >> (define* (make-gcc-4.8 #:key languages) >> (package >> ... > >> #:configure-flags ... ,(string-join languages ",") > >> ...)) > >> (define gcc-4.8 >> (make-gcc-4.8 #:languages '("c" "c++"))) > >> That would probably be easier to work with. > > I don=E2=80=99t like the above version because it doesn=E2=80=99t allow t= o choose the > version of GCC. Just add a =E2=80=98gcc=E2=80=99 parameter. > Also, =E2=80=98/nix/store/nxpzxlvg5z5qq10wzxrzk9hjyhxyicxq-gfortran-4.8.1= /bin=E2=80=99 > contains these programs: > > c++ gcc-ranlib i686-pc-linux-gnu-gcc-4.8.1 > cpp gcov i686-pc-linux-gnu-gcc-ar > g++ gfortran i686-pc-linux-gnu-gcc-nm > gcc i686-pc-linux-gnu-c++ i686-pc-linux-gnu-gcc-ranlib > gcc-ar i686-pc-linux-gnu-g++ i686-pc-linux-gnu-gfortran > gcc-nm i686-pc-linux-gnu-gcc > > Are C++ and C-related programs supposed to be there? Yes, the C and C++ front-ends are always compiled. > -(define-public gcc-4.7 > +(define* (inherit-gcc name* version* source* #:key (languages '("c" "c++= "))) I would really =E2=80=98make-gcc=E2=80=99, or maybe =E2=80=98custom-gcc=E2= =80=99. Good news: the stars in these parameter names are no longer needed (commit 59fbeb8). > (let* ((stripped? #t) ; TODO: make this a pa= rameter > (maybe-target-tools > (lambda () > @@ -68,13 +68,14 @@ where the OS part is overloaded to denote a specific = ABI---into GCC > ;; contents of (maybe-target-tools). > (list 'quasiquote > (append > - '("--enable-plugin" > - "--enable-languages=3Dc,c++" > + `("--enable-plugin" > + ,(string-append "--enable-languages=3D" > + (string-join languages ",")) > "--disable-multilib" >=20=20 > - "--with-local-prefix=3D/no-gcc-local-prefix" > + "--with-local-prefix=3D/no-gcc-local-prefix") >=20=20 > - ,(let ((libc (assoc-ref %build-inputs "libc"))) > + '(,(let ((libc (assoc-ref %build-inputs "libc"))) I guess this line shouldn=E2=80=99t have changed. > @@ -200,6 +195,17 @@ Go. It also includes standard libraries for these l= anguages.") > (license gpl3+) > (home-page "http://gcc.gnu.org/")))) >=20=20 > +(define-public gcc-4.7 > + (let ((version "4.7.3")) > + (inherit-gcc "gcc" version > + (origin > + (method url-fetch) > + (uri (string-append "mirror://gnu/gcc/gcc-" > + version "/gcc-" version ".tar.bz2"= )) > + (sha256 > + (base32 > + "1hx9h64ivarlzi4hxvq42as5m9vlr5cyzaaq4gzj4i619zmkfz1= g")))))) I guess this triggers a complete rebuild, right? (That means it would go in =E2=80=98core-updates=E2=80=99.) Using the =E2=80=98substitute-keyword-arguments=E2=80=99 hack as in base.sc= m would allow you to avoid that. Also, the =E2=80=98origin=E2=80=99 thing should be factorized: (define (gcc-source version) (origin ...)) It=E2=80=99s good that you=E2=80=99re tackling this! Then we can also buil= d the Objective-C front-end, and then start GNUstepping. Thanks, Ludo=E2=80=99.