From b29eb4212e8d9077e0c01911c5448a5900210954 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 23 Oct 2019 22:22:24 +0200 Subject: Users can configure use of RPATH or RUNPATH (#9168) Add a new entry in `config.yaml`: config: shared_linking: 'rpath' If this variable is set to `rpath` (the default) Spack will set RPATH in ELF binaries. If set to `runpath` it will set RUNPATH. Details: * Spack cc wrapper explicitly adds `--disable-new-dtags` when linking * cc wrapper also strips `--enable-new-dtags` from the compile line when disabling (and vice versa) * We specifically do *not* add any dtags flags on macOS, which uses Mach-O binaries, not ELF, so there's no RUNPATH) --- etc/spack/defaults/config.yaml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'etc') diff --git a/etc/spack/defaults/config.yaml b/etc/spack/defaults/config.yaml index d6c9551d93..6be1d9770b 100644 --- a/etc/spack/defaults/config.yaml +++ b/etc/spack/defaults/config.yaml @@ -138,3 +138,8 @@ config: # anticipates that a significant delay indicates that the lock attempt will # never succeed. package_lock_timeout: null + + # Control whether Spack embeds RPATH or RUNPATH attributes in ELF binaries. + # Has no effect on macOS. DO NOT MIX these within the same install tree. + # See the Spack documentation for details. + shared_linking: 'rpath' -- cgit v1.2.3-60-g2f50