From 8072571e72cb1c8952cbf2d17bb161b43419d7e4 Mon Sep 17 00:00:00 2001 From: Yann Dupont Date: Wed, 13 May 2020 12:30:11 +0200 Subject: [PATCH] =?UTF-8?q?Revert=20"attention,=20gcc.scm=20est=20patch?= =?UTF-8?q?=C3=A9..."?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 7f83f288fe3da9e8ba80bd7b158e4ade96fe9b94. Conflicts: gnu/packages/glicid.scm --- gnu/packages/glicid.scm | 60 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/gnu/packages/glicid.scm b/gnu/packages/glicid.scm index f40e57f..cf28868 100644 --- a/gnu/packages/glicid.scm +++ b/gnu/packages/glicid.scm @@ -186,11 +186,71 @@ ) +<<<<<<< HEAD (define-public glicid-openmpi (package (inherit openmpi) (name "glicid-openpmi") )) +======= +(define* (custom-gcc gcc name languages + #:optional + (search-paths (package-native-search-paths gcc)) + #:key (separate-lib-output? #t)) + "Return a custom version of GCC that supports LANGUAGES. Use SEARCH-PATHS +as the 'native-search-paths' field." + (package (inherit gcc) + (name name) + (outputs (if separate-lib-output? + (package-outputs gcc) + (delete "lib" (package-outputs gcc)))) + (native-search-paths search-paths) + (properties (alist-delete 'hidden? (package-properties gcc))) + (arguments + (substitute-keyword-arguments (package-arguments gcc) + ((#:modules modules %gnu-build-system-modules) + `(,@modules + (srfi srfi-1) + (srfi srfi-26) + (ice-9 regex))) + ((#:configure-flags flags) + `(cons (string-append "--enable-languages=" + ,(string-join languages ",")) + (remove (cut string-match "--enable-languages.*" <>) + ,flags))) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'install 'remove-broken-or-conflicting-files + (lambda* (#:key outputs #:allow-other-keys) + (for-each delete-file + (find-files (string-append (assoc-ref outputs "out") "/bin") + ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc|gcc-.*)")) + #t)))))))) + +(define %generic-search-paths + ;; This is the language-neutral search path for GCC. Entries in $CPATH are + ;; not considered "system headers", which means GCC can raise warnings for + ;; issues in those headers. 'CPATH' is the only one that works for + ;; front-ends not in the C family. + (list (search-path-specification + (variable "CPATH") + (files '("include"))) + (search-path-specification + (variable "LIBRARY_PATH") + (files '("lib" "lib64"))))) + +(define-public gfortran-9 + (custom-gcc gcc-9 "gfortran" '("fortran") + %generic-search-paths)) + +(define-public gfortran-10 + (custom-gcc gcc-10 "gfortran" '("fortran") + %generic-search-paths)) + +(define-public glicid-gfortran-9 gfortran-9) +(define-public glicid-gfortran-10 gfortran-10) + +>>>>>>> parent of 34257ea... attention, gcc.scm est patché... ;;; glicid.scm ends here