Merge pull request #132269 from collares/ecl-boehmgc

ecl: make sure boehmgc is available to gcc/linker

authored by Jörg Thalheim and committed by GitHub 63003160 7f1f43f3

+14 -10
+14 -10
pkgs/development/compilers/ecl/default.nix
··· 47 47 (if threadSupport then "--enable-threads" else "--disable-threads") 48 48 "--with-gmp-prefix=${gmp.dev}" 49 49 "--with-libffi-prefix=${libffi.dev}" 50 - ] 51 - ++ 52 - (lib.optional (! noUnicode) 53 - "--enable-unicode") 54 - ; 50 + ] 51 + ++ 52 + (lib.optional useBoehmgc 53 + "--with-libgc-prefix=${boehmgc.dev}") 54 + ++ 55 + (lib.optional (! noUnicode) 56 + "--enable-unicode") 57 + ; 55 58 56 59 hardeningDisable = [ "format" ]; 57 60 58 - postInstall = '' 61 + postInstall = let 62 + ldArgs = lib.strings.concatMapStringsSep " " 63 + (l: ''--prefix NIX_LDFLAGS ' ' "-L${l.lib or l.out or l}/lib"'') 64 + ([ gmp libffi ] ++ lib.optional useBoehmgc boehmgc); 65 + in '' 59 66 sed -e 's/@[-a-zA-Z_]*@//g' -i $out/bin/ecl-config 60 - wrapProgram "$out/bin/ecl" \ 61 - --prefix PATH ':' "${gcc}/bin" \ 62 - --prefix NIX_LDFLAGS ' ' "-L${gmp.lib or gmp.out or gmp}/lib" \ 63 - --prefix NIX_LDFLAGS ' ' "-L${libffi.lib or libffi.out or libffi}/lib" 67 + wrapProgram "$out/bin/ecl" --prefix PATH ':' "${gcc}/bin" ${ldArgs} 64 68 ''; 65 69 66 70 meta = {