compcert: build with Coq 8.11
And fix installation of development files (use upstream Makefile rules instead of ad-hoc commands).
This commit is contained in:
parent
c2bb4af48d
commit
9a913b5125
@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, fetchFromGitHub, makeWrapper
|
||||
{ stdenv, lib, fetchFromGitHub, fetchpatch, makeWrapper
|
||||
, coq, ocamlPackages, coq2html
|
||||
, tools ? stdenv.cc
|
||||
}:
|
||||
@ -21,11 +21,22 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1h4zhk9rrqki193nxs9vjvya7nl9yxjcf07hfqb6g77riy1vd2jr";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/AbsInt/CompCert/commit/0a2db0269809539ccc66f8ec73637c37fbd23580.patch";
|
||||
sha256 = "0n8qrba70x8f422jdvq9ddgsx6avf2dkg892g4ldh3jiiidyhspy";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/AbsInt/CompCert/commit/5e29f8b5ba9582ecf2a1d0baeaef195873640607.patch";
|
||||
sha256 = "184nfdgxrkci880lkaj5pgnify3plka7xfgqrgv16275sqppc5hc";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = ocaml-pkgs ++ [ coq coq2html ];
|
||||
enableParallelBuilding = true;
|
||||
|
||||
patchPhase = ''
|
||||
postPatch = ''
|
||||
substituteInPlace ./configure \
|
||||
--replace '{toolprefix}gcc' '{toolprefix}cc'
|
||||
'';
|
||||
@ -33,6 +44,7 @@ stdenv.mkDerivation rec {
|
||||
configurePhase = ''
|
||||
./configure -clightgen \
|
||||
-prefix $out \
|
||||
-coqdevdir $lib/lib/coq/${coq.coq-version}/user-contrib/compcert/ \
|
||||
-toolprefix ${tools}/bin/ \
|
||||
${ccomp-platform}
|
||||
'';
|
||||
@ -47,12 +59,6 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $doc/share/doc/compcert
|
||||
mv doc/html $doc/share/doc/compcert/
|
||||
|
||||
# install compcert lib files; remove copy from $out, too
|
||||
mkdir -p $lib/lib/coq/${coq.coq-version}/user-contrib/compcert/
|
||||
mv backend cfrontend common cparser driver flocq x86 x86_64 lib \
|
||||
$lib/lib/coq/${coq.coq-version}/user-contrib/compcert/
|
||||
rm -rf $out/lib/compcert/coq
|
||||
|
||||
# wrap ccomp to undefine _FORTIFY_SOURCE; ccomp invokes cc1 which sets
|
||||
# _FORTIFY_SOURCE=2 by default, but undefines __GNUC__ (as it should),
|
||||
# which causes a warning in libc. this suppresses it.
|
||||
|
@ -8560,9 +8560,7 @@ in
|
||||
|
||||
cmucl_binary = pkgsi686Linux.callPackage ../development/compilers/cmucl/binary.nix { };
|
||||
|
||||
compcert = callPackage ../development/compilers/compcert {
|
||||
inherit (coqPackages_8_10) coq;
|
||||
};
|
||||
compcert = callPackage ../development/compilers/compcert {};
|
||||
|
||||
computecpp-unwrapped = callPackage ../development/compilers/computecpp {};
|
||||
computecpp = wrapCCWith rec {
|
||||
|
Loading…
x
Reference in New Issue
Block a user