mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-21 08:01:31 +00:00
polyml: Fix polyc linking script
polyc linking script hardcodes the linker to be the value of `$CXX` at
compile time. This is bad for environments without `g++` in path. Fix
this by patching the correct path into the script.
Co-Authored-By: Ricardo Correia <someplaceguy@wizy.org>
Co-Authored-By: Ivan Trubach <mr.trubach@icloud.com>
(cherry picked from commit 3a717e7522)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
pkgsHostTarget,
|
||||
fetchFromGitHub,
|
||||
autoreconfHook,
|
||||
gmp,
|
||||
@@ -35,6 +36,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
buildInputs = [
|
||||
libffi
|
||||
gmp
|
||||
pkgsHostTarget.stdenv.cc
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
@@ -45,6 +47,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"--with-gmp"
|
||||
];
|
||||
|
||||
preInstall = ''
|
||||
substituteInPlace polyc \
|
||||
--replace-fail "LINK=\"$CXX\"" "LINK=\"${lib.getExe' pkgsHostTarget.stdenv.cc "c++"}\""
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user