From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Karetnikov Subject: [PATCH] gnu: Add GCC front ends for Fortran, Go, Objective C, and Objective C++. Date: Fri, 01 Nov 2013 00:13:14 +0400 Message-ID: <8761sdb3mt.fsf_-_@karetnikov.org> References: <87wqlfutme.fsf@karetnikov.org> <87hacijnke.fsf@gnu.org> <87ppr4giie.fsf@karetnikov.org> <8738nzdig1.fsf@gnu.org> <87hacdmyc2.fsf_-_@karetnikov.org> <87bo2bkd7f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbyXd-0000OA-0M for guix-devel@gnu.org; Thu, 31 Oct 2013 16:08:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbyXY-0004lg-7I for guix-devel@gnu.org; Thu, 31 Oct 2013 16:08:28 -0400 In-Reply-To: <87bo2bkd7f.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Sat, 26 Oct 2013 22:08:04 +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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >> If you want to test any of the front-ends, don=E2=80=99t forget to set >> LIBRARY_PATH and LD_LIBRARY_PATH, like so: >> >> $ export LIBRARY_PATH=3D/nix/store/wmaxqx3p658v2yqjv00mss2shvn23h7a-glib= c-2.18/lib >> $ export LD_LIBRARY_PATH=3D/nix/store/kvhg0fszagsx5y80sq79bkmb7yqvjfmd-g= cc-go-4.8.1/lib > I guess that=E2=80=99s unnecessary when using =E2=80=98ld-wrapper=E2=80= =99. I know nothing about it. Could you elaborate? I tested each front end using the =E2=80=9Chello, world=E2=80=9D program. = Is it enough? It was necessary to set some environment variables. An example for Fortran: LIBRARY_PATH=3D/nix/var/nix/profiles/default/guix-profile/lib LD_LIBRARY_PATH=3D/nix/store/jh5shyx6pg7m0dibdgl202pj7ryp5nvq-gfortran-4.8.= 2/lib CPATH=3D/nix/var/nix/profiles/default/guix-profile/include PATH=3D/nix/var/nix/profiles/default/guix-profile/bin:$PATH May I push this patch to =E2=80=98master=E2=80=99? --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-gnu-Add-GCC-front-ends-for-Fortran-Go-Objective-C-an.patch Content-Transfer-Encoding: quoted-printable From=20be260e7d9d4a7592129c0369eee52b156170d1cf Mon Sep 17 00:00:00 2001 From: Nikita Karetnikov Date: Thu, 31 Oct 2013 19:54:36 +0000 Subject: [PATCH] gnu: Add GCC front ends for Fortran, Go, Objective C, and Objective C++. * gnu/packages/gcc.scm (custom-gcc, gfortran-4.8, gccgo-4.8) (gcc-objc-4.8, gcc-objc++-4.8): New variables. =2D-- gnu/packages/gcc.scm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index dde0f0d..60bc5bb 100644 =2D-- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -27,6 +27,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) + #:use-module (guix utils) #:use-module (ice-9 regex)) =20 (define %gcc-infrastructure @@ -211,6 +212,34 @@ Go. It also includes standard libraries for these lan= guages.") (base32 "1j6dwgby4g3p3lz7zkss32ghr45zpdidrg8xvazvn91lqxv25p09")))))) =20 +(define (custom-gcc gcc name languages) + (package (inherit gcc) + (name name) + (arguments + (substitute-keyword-arguments `(#:modules ((guix build gnu-build-syst= em) + (guix build utils) + (ice-9 regex) + (srfi srfi-1) + (srfi srfi-26)) + ,@(package-arguments gcc)) + ((#:configure-flags flags) + `(cons (string-append "--enable-languages=3D" + ,(string-join languages ",")) + (remove (cut string-match "--enable-languages.*" <>) + ,flags))))))) + +(define-public gfortran-4.8 + (custom-gcc gcc-4.8 "gfortran" '("fortran"))) + +(define-public gccgo-4.8 + (custom-gcc gcc-4.8 "gccgo" '("go"))) + +(define-public gcc-objc-4.8 + (custom-gcc gcc-4.8 "gcc-objc" '("objc"))) + +(define-public gcc-objc++-4.8 + (custom-gcc gcc-4.8 "gcc-objc++" '("obj-c++"))) + (define-public isl (package (name "isl") =2D-=20 1.7.9.5 --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJScrncAAoJEM+IQzI9IQ38EgQP/A7yXwpD6y5b2YffQdtKMA6P 9dWlhv6ZESmHsxue5kkuaMLFSws1qM7gzWGCYrsT3kYayJNIzJ/oahYNBeOTBSXZ /UMQfFW3Uh6CYXaR4QO1qrCg8hfjt/e19i9XC0CsWXnoSz6S/mPBU512MYbEQ/Sv uP/uZ268cmvU/IlpC9uEzGGvTf1LM8DsyOD/vEnHpTzZhy5Klya9nVxFvxvIL1AL QNN5YEby27P4tRD4gZKcqlwgcDz9rFKZ5d92UdGW5Oo4uhKywnRyV482GoHv6Htm zdoErTu+V/c50BetsvHJTHWbMB9XtjLL96tNakXKGeWDrRZ+B3EnZNCMn/P66tOF 9Shfaz06sq9ROHD9kp2Dm/DqTo/DotREg8DztBEf07iVZAOKsH7IpkQYXlmGokHD AqzlgIylVuSNEqYb5CV+Oi6BlGk7KHF50jjTacQSW4KHKpCZwT40oXqukok0lOok cNednrjkEIzi0uHCTZF4m6S5xZV86hJPnTBV7ckj+GJMbXzum0w6Ug3dIRhkkVgU wvBqxaw9PtujJz53bOukd+h5cVwaG19BdwKyibBTlfzwVZ19ov/cfQ67gJ7RNA94 1MvGFYeRie6bFvOl5XClSfhSDGRBc5JygRDvPf1l+GPA9QhJgzPv4Kpt/84TZ3ex wc44aisWleWx0ejBYcIy =4naP -----END PGP SIGNATURE----- --==-=-=--