pkgs/build-support/cabal: clean up the code that sets rpath for shared executables
This commit is contained in:
parent
45e8de9a7d
commit
8b11fb8fcb
@ -156,7 +156,7 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
|
|||||||
(optional (versionOlder "7" ghc.version) (enableFeature self.enableStaticLibraries "library-vanilla"))
|
(optional (versionOlder "7" ghc.version) (enableFeature self.enableStaticLibraries "library-vanilla"))
|
||||||
(optional (versionOlder "7.4" ghc.version) (enableFeature self.enableSharedExecutables "executable-dynamic"))
|
(optional (versionOlder "7.4" ghc.version) (enableFeature self.enableSharedExecutables "executable-dynamic"))
|
||||||
(optional (versionOlder "7" ghc.version) (enableFeature self.doCheck "tests"))
|
(optional (versionOlder "7" ghc.version) (enableFeature self.doCheck "tests"))
|
||||||
] ++ optional self.enableSharedExecutables "--ghc-option=-optl=-Wl,-rpath=$ORIGIN/../lib/${ghc.ghc.name}/${self.pname}-${self.version}";
|
];
|
||||||
|
|
||||||
# GHC needs the locale configured during the Haddock phase.
|
# GHC needs the locale configured during the Haddock phase.
|
||||||
LANG = "en_US.UTF-8";
|
LANG = "en_US.UTF-8";
|
||||||
@ -187,6 +187,10 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
|
|||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
${optionalString self.enableSharedExecutables ''
|
||||||
|
configureFlags+=" --ghc-option=-optl=-Wl,-rpath=$out/lib/${ghc.ghc.name}/${self.pname}-${self.version}";
|
||||||
|
''}
|
||||||
|
|
||||||
echo "configure flags: $extraConfigureFlags $configureFlags"
|
echo "configure flags: $extraConfigureFlags $configureFlags"
|
||||||
./Setup configure --verbose --prefix="$out" --libdir='$prefix/lib/$compiler' --libsubdir='$pkgid' $extraConfigureFlags $configureFlags
|
./Setup configure --verbose --prefix="$out" --libdir='$prefix/lib/$compiler' --libsubdir='$pkgid' $extraConfigureFlags $configureFlags
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user