Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ecl: make sure boehmgc is available to gcc/linker #132269

Merged
merged 1 commit into from
Aug 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions pkgs/development/compilers/ecl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,24 @@ stdenv.mkDerivation {
(if threadSupport then "--enable-threads" else "--disable-threads")
"--with-gmp-prefix=${gmp.dev}"
"--with-libffi-prefix=${libffi.dev}"
]
++
(lib.optional (! noUnicode)
"--enable-unicode")
;
]
++
(lib.optional useBoehmgc
"--with-libgc-prefix=${boehmgc.dev}")
++
(lib.optional (! noUnicode)
"--enable-unicode")
;

hardeningDisable = [ "format" ];

postInstall = ''
postInstall = let
ldArgs = lib.strings.concatMapStringsSep " "
(l: ''--prefix NIX_LDFLAGS ' ' "-L${l.lib or l.out or l}/lib"'')
([ gmp libffi ] ++ lib.optional useBoehmgc boehmgc);
in ''
sed -e 's/@[-a-zA-Z_]*@//g' -i $out/bin/ecl-config
wrapProgram "$out/bin/ecl" \
--prefix PATH ':' "${gcc}/bin" \
--prefix NIX_LDFLAGS ' ' "-L${gmp.lib or gmp.out or gmp}/lib" \
--prefix NIX_LDFLAGS ' ' "-L${libffi.lib or libffi.out or libffi}/lib"
wrapProgram "$out/bin/ecl" --prefix PATH ':' "${gcc}/bin" ${ldArgs}
'';

meta = {
Expand Down