diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-02-14 00:14:29 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-02-27 20:55:38 +0100 |
commit | 790b8e0ebe63ae8d042327e6b1422c951166eb07 (patch) | |
tree | 2ff5eeacde809df9994aacb0fb8b1f4297157fcb | |
parent | ddff766e38e446ae84bd099f4473406706ba2d80 (diff) | |
download | guix-790b8e0ebe63ae8d042327e6b1422c951166eb07.tar.gz guix-790b8e0ebe63ae8d042327e6b1422c951166eb07.zip |
build-system/gnu: Make the strip behavior of `static-package' configurable.
* guix/build-system/gnu.scm (static-package): Add #:strip-all? keyword
parameter.
-rw-r--r-- | guix/build-system/gnu.scm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index 82f5bb8490..5be4782c2f 100644 --- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -111,20 +111,24 @@ flags for VARIABLE, the associated value is augmented." "A version of P linked with `-static-gcc'." (package-with-extra-configure-variable p "LDFLAGS" "-static-libgcc")) -(define* (static-package p #:optional (loc (current-source-location))) - "Return a statically-linked version of package P." +(define* (static-package p #:optional (loc (current-source-location)) + #:key (strip-all? #t)) + "Return a statically-linked version of package P. If STRIP-ALL? is true, +use `--strip-all' as the arguments to `strip'." (let ((args (package-arguments p))) (package (inherit p) (location (source-properties->location loc)) (arguments (let ((a (default-keyword-arguments args '(#:configure-flags '() - #:strip-flags #f)))) + #:strip-flags '("--strip-debug"))))) (substitute-keyword-arguments a ((#:configure-flags flags) `(cons* "--disable-shared" "LDFLAGS=-static" ,flags)) - ((#:strip-flags _) - ''("--strip-all")))))))) + ((#:strip-flags flags) + (if strip-all? + ''("--strip-all") + flags)))))))) (define %store |