diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index cececca..46c4804 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -47,7 +47,7 @@ where the OS part is overloaded to denote a specific ABI---into GCC ;; TODO: Add `armel.*gnueabi', `hf', etc. '()))) -(define-public gcc-4.7 +(define* (inherit-gcc name* version* source* #:key (languages '("c" "c++"))) (let* ((stripped? #t) ; TODO: make this a parameter (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=c,c++" + `("--enable-plugin" + ,(string-append "--enable-languages=" + (string-join languages ",")) "--disable-multilib" - "--with-local-prefix=/no-gcc-local-prefix" + "--with-local-prefix=/no-gcc-local-prefix") - ,(let ((libc (assoc-ref %build-inputs "libc"))) + '(,(let ((libc (assoc-ref %build-inputs "libc"))) (if libc (string-append "--with-native-system-header-dir=" libc "/include") @@ -88,15 +89,9 @@ where the OS part is overloaded to denote a specific ABI---into GCC (maybe-target-tools)))))) (package - (name "gcc") - (version "4.7.3") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/gcc/gcc-" - version "/gcc-" version ".tar.bz2")) - (sha256 - (base32 - "1hx9h64ivarlzi4hxvq42as5m9vlr5cyzaaq4gzj4i619zmkfz1g")))) + (name name*) + (version version*) + (source source*) (build-system gnu-build-system) (inputs `(("gmp" ,gmp) ("mpfr" ,mpfr) @@ -200,6 +195,17 @@ Go. It also includes standard libraries for these languages.") (license gpl3+) (home-page "http://gcc.gnu.org/")))) +(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 + "1hx9h64ivarlzi4hxvq42as5m9vlr5cyzaaq4gzj4i619zmkfz1g")))))) + (define-public gcc-4.8 (package (inherit gcc-4.7) (version "4.8.1") @@ -211,6 +217,18 @@ Go. It also includes standard libraries for these languages.") (base32 "04sqn0ds17ys8l6zn7vyyvjz1a7hsk4zb0381vlw9wnr7az48nsl")))))) +(define-public gfortran-4.8 + (let ((version "4.8.1")) + (inherit-gcc "gfortran" version + (origin + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-" + version "/gcc-" version ".tar.bz2")) + (sha256 + (base32 + "04sqn0ds17ys8l6zn7vyyvjz1a7hsk4zb0381vlw9wnr7az48nsl"))) + #:languages '("fortran")))) + (define-public isl (package (name "isl")