aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/parallel.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2024-09-10 10:33:57 +0200
committerLudovic Courtès <ludo@gnu.org>2024-09-16 10:58:52 +0200
commit3daab044145b4b39fe60c64e89f35e3b2a538935 (patch)
treeda87645b7230359c57f61fef1a30bdfc10b13254 /gnu/packages/parallel.scm
parentf18269421de41174e41a364fb831502ac308c0a5 (diff)
downloadguix-3daab044145b4b39fe60c64e89f35e3b2a538935.tar
guix-3daab044145b4b39fe60c64e89f35e3b2a538935.tar.gz
gnu: openpmix: Do not keep a reference to GCC and other build tools.
This reduces the closure of ‘openpmix’ from 297 MiB to 93 MiB. * gnu/packages/parallel.scm (openpmix)[arguments]: Add #:phases and #:disallowed-references. Change-Id: I231c550743e2854e431b8100584bd464695de695
Diffstat (limited to 'gnu/packages/parallel.scm')
-rw-r--r--gnu/packages/parallel.scm25
1 files changed, 24 insertions, 1 deletions
diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm
index d5a55a8641..a77894b8d6 100644
--- a/gnu/packages/parallel.scm
+++ b/gnu/packages/parallel.scm
@@ -52,6 +52,7 @@
#:use-module (gnu packages documentation)
#:use-module (gnu packages flex)
#:use-module (gnu packages freeipmi)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages libevent)
#:use-module (gnu packages linux)
#:use-module (gnu packages maths)
@@ -646,7 +647,29 @@ single-instruction multiple-data (SIMD) intrinsics.")
(arguments
(list #:configure-flags
#~(list (string-append "--with-hwloc="
- (ungexp (this-package-input "hwloc") "lib")))))
+ (ungexp (this-package-input "hwloc") "lib")))
+
+ ;; Don't keep a reference to GCC.
+ #:disallowed-references (and (not (%current-target-system))
+ (list (canonical-package gcc)))
+
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'strip-pmix-cc-absolute
+ (lambda _
+ ;; The 'pmix_info' program prints the 'configure' command
+ ;; line, compiler absolute file name, etc., which causes it
+ ;; to keep references to many build-time packages. Scrub
+ ;; these.
+ (substitute* "configure"
+ (("PMIX_CC_ABSOLUTE=\"(.*)\"" _ cc)
+ (string-append "PMIX_CC_ABSOLUTE=\"$(basename \""
+ cc "\")\"\n")))))
+ (add-after 'configure 'strip-pmix-config-header
+ (lambda _
+ (substitute* "src/include/pmix_config.h"
+ (("#define PMIX_CONFIGURE_CLI .*")
+ "#define PMIX_CONFIGURE_CLI \"[scrubbed]\"\n")))))))
(inputs (list libevent `(,hwloc "lib")))
(native-inputs (list perl python))
(synopsis "PMIx library")