From be260e7d9d4a7592129c0369eee52b156170d1cf 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. --- 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 --- 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)) (define %gcc-infrastructure @@ -211,6 +212,34 @@ Go. It also includes standard libraries for these languages.") (base32 "1j6dwgby4g3p3lz7zkss32ghr45zpdidrg8xvazvn91lqxv25p09")))))) +(define (custom-gcc gcc name languages) + (package (inherit gcc) + (name name) + (arguments + (substitute-keyword-arguments `(#:modules ((guix build gnu-build-system) + (guix build utils) + (ice-9 regex) + (srfi srfi-1) + (srfi srfi-26)) + ,@(package-arguments gcc)) + ((#:configure-flags flags) + `(cons (string-append "--enable-languages=" + ,(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") -- 1.7.9.5