From 83bfb82f4da6fb23d3b64c7e23f9db001c85b283 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 7 Aug 2017 22:56:57 +0300 Subject: [PATCH 1/3] gnu: custom-gcc: Add flag to optionally not remove conflicting files. * gnu/packages/gcc.scm (custom-gcc): Add flag to optionally keep the files that would conflict with gcc. --- gnu/packages/gcc.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index bb8570bec..a22bb3c25 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -485,7 +485,8 @@ using compilers other than GCC." (define* (custom-gcc gcc name languages #:optional (search-paths (package-native-search-paths gcc)) - #:key (separate-lib-output? #t)) + #:key (separate-lib-output? #t) + (remove-conflicting-files? #t)) "Return a custom version of GCC that supports LANGUAGES. Use SEARCH-PATHS as the 'native-search-paths' field." (package (inherit gcc) @@ -508,12 +509,14 @@ as the 'native-search-paths' field." ,flags))) ((#:phases phases) `(modify-phases ,phases - (add-after 'install 'remove-broken-or-conflicting-files + ,@(if remove-conflicting-files? + `((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.*)")) - #t)))))))) + #t))) + '()))))))) (define %generic-search-paths ;; This is the language-neutral search path for GCC. Entries in $CPATH are -- 2.14.0