graalvm: Use lib.getVersion for stdenv.cc

This commit is contained in:
Filipe Regadas 2019-10-20 22:31:20 +01:00
parent 463eb7daff
commit 487ade32ab
No known key found for this signature in database
GPG Key ID: 56776825923FC777

View File

@ -293,7 +293,7 @@ in rec {
# gfortran readline bzip2 lzma pcre.dev curl ed ## WIP: fastr dependencies
];
postUnpack = ''
cp ${stdenv.cc.cc}/include/c++/${stdenv.cc.cc.version}/stdlib.h \
cp ${stdenv.cc.cc}/include/c++/${lib.getVersion stdenv.cc.cc}/stdlib.h \
$sourceRoot/sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/include
cp ${truffleMake} $TMP && mv *truffle.make truffle.make
rm $sourceRoot/truffle/src/libffi/patches/others/0001-Add-mx-bootstrap-Makefile.patch
@ -318,7 +318,7 @@ in rec {
--replace 'protected String compilerCommand = "cc";' 'protected String compilerCommand = "${stdenv.cc}/bin/cc";'
# prevent cyclical imports caused by identical <include> names
substituteInPlace sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/include/stdlib.h \
--replace '# include <cstdlib>' '# include "${stdenv.cc.cc}/include/c++/${stdenv.cc.cc.version}/cstdlib"'
--replace '# include <cstdlib>' '# include "${stdenv.cc.cc}/include/c++/${lib.getVersion stdenv.cc.cc}/cstdlib"'
# dragonegg can't seem to compile on nix, so let's not require it
substituteInPlace sulong/mx.sulong/suite.py \
--replace '"requireDragonegg" : True,' '"requireDragonegg" : False,'