gambit: 4.9.3 -> 4.9.5
This commit is contained in:
parent
239dd4e537
commit
d68f7974fa
4 changed files with 26 additions and 20 deletions
|
@ -6,11 +6,11 @@
|
||||||
|
|
||||||
gccStdenv.mkDerivation {
|
gccStdenv.mkDerivation {
|
||||||
pname = "gambit-bootstrap";
|
pname = "gambit-bootstrap";
|
||||||
version = "4.9.3";
|
version = "4.9.5";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.9/source/gambit-v4_9_3.tgz";
|
url = "https://gambitscheme.org/4.9.5/gambit-v4_9_5.tgz";
|
||||||
sha256 = "1p6172vhcrlpjgia6hsks1w4fl8rdyjf9xjh14wxfkv7dnx8a5hk";
|
sha256 = "sha256-4o74218OexFZcgwVAFPcq498TK4fDlyDiUR5cHP4wdw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ autoconf ];
|
buildInputs = [ autoconf ];
|
||||||
|
|
|
@ -39,11 +39,14 @@ gccStdenv.mkDerivation rec {
|
||||||
"--enable-targets=${gambit-params.targets}"
|
"--enable-targets=${gambit-params.targets}"
|
||||||
"--enable-single-host"
|
"--enable-single-host"
|
||||||
"--enable-c-opt=${optimizationSetting}"
|
"--enable-c-opt=${optimizationSetting}"
|
||||||
|
"--enable-c-opt-rts=-O2"
|
||||||
"--enable-gcc-opts"
|
"--enable-gcc-opts"
|
||||||
"--enable-shared"
|
"--enable-shared"
|
||||||
"--enable-absolute-shared-libs" # Yes, NixOS will want an absolute path, and fix it.
|
"--enable-absolute-shared-libs" # Yes, NixOS will want an absolute path, and fix it.
|
||||||
"--enable-openssl"
|
"--enable-openssl"
|
||||||
|
#"--enable-default-compile-options='(compactness 9)'" # Make life easier on the JS backend
|
||||||
"--enable-default-runtime-options=${gambit-params.defaultRuntimeOptions}"
|
"--enable-default-runtime-options=${gambit-params.defaultRuntimeOptions}"
|
||||||
|
# "--enable-rtlib-debug" # used by Geiser, but only on recent-enough gambit, and messes js runtime
|
||||||
# "--enable-debug" # Nope: enables plenty of good stuff, but also the costly console.log
|
# "--enable-debug" # Nope: enables plenty of good stuff, but also the costly console.log
|
||||||
# "--enable-multiple-versions" # Nope, NixOS already does version multiplexing
|
# "--enable-multiple-versions" # Nope, NixOS already does version multiplexing
|
||||||
# "--enable-guide"
|
# "--enable-guide"
|
||||||
|
@ -84,18 +87,19 @@ gccStdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
# Make bootstrap compiler, from release bootstrap
|
echo "Make bootstrap compiler, from release bootstrap"
|
||||||
mkdir -p boot
|
mkdir -p boot
|
||||||
cp -rp ${bootstrap}/gambit/. boot/.
|
cp -rp ${bootstrap}/gambit/. boot/.
|
||||||
chmod -R u+w boot
|
chmod -R u+w boot
|
||||||
cd boot
|
cd boot
|
||||||
cp ../gsc/makefile.in ../gsc/*.scm gsc/
|
cp ../gsc/makefile.in ../gsc/*.scm gsc/
|
||||||
|
echo > include/stamp.h # No stamp needed for the bootstrap compiler
|
||||||
./configure
|
./configure
|
||||||
for i in lib gsi gsc ; do (cd $i ; make -j$NIX_BUILD_CORES) ; done
|
for i in lib gsi gsc ; do (cd $i ; make -j$NIX_BUILD_CORES) ; done
|
||||||
cd ..
|
cd ..
|
||||||
cp boot/gsc/gsc gsc-boot
|
cp boot/gsc/gsc gsc-boot
|
||||||
|
|
||||||
# Now use the bootstrap compiler to build the real thing!
|
echo "Now use the bootstrap compiler to build the real thing!"
|
||||||
make -j$NIX_BUILD_CORES from-scratch
|
make -j$NIX_BUILD_CORES from-scratch
|
||||||
${lib.optionalString gambit-params.modules "make -j$NIX_BUILD_CORES modules"}
|
${lib.optionalString gambit-params.modules "make -j$NIX_BUILD_CORES modules"}
|
||||||
'';
|
'';
|
||||||
|
@ -107,6 +111,7 @@ gccStdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
dontStrip = true;
|
||||||
|
|
||||||
meta = gambit-support.meta;
|
meta = gambit-support.meta;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{ callPackage, fetchurl }:
|
{ callPackage, fetchurl }:
|
||||||
|
|
||||||
callPackage ./build.nix rec {
|
callPackage ./build.nix rec {
|
||||||
version = "4.9.3";
|
version = "4.9.5";
|
||||||
git-version = version;
|
git-version = version;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.9/source/gambit-v4_9_3.tgz";
|
url = "https://gambitscheme.org/4.9.5/gambit-v4_9_5.tgz";
|
||||||
sha256 = "1p6172vhcrlpjgia6hsks1w4fl8rdyjf9xjh14wxfkv7dnx8a5hk";
|
sha256 = "sha256-4o74218OexFZcgwVAFPcq498TK4fDlyDiUR5cHP4wdw=";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,24 +3,25 @@
|
||||||
rec {
|
rec {
|
||||||
stable-params = {
|
stable-params = {
|
||||||
stable = true;
|
stable = true;
|
||||||
defaultRuntimeOptions = "f8,-8,t8";
|
|
||||||
buildRuntimeOptions = "f8,-8,t8";
|
|
||||||
fix-stamp = git-version : "";
|
|
||||||
targets = "java,js,php,python,ruby";
|
|
||||||
modules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
unstable-params = {
|
|
||||||
stable = false;
|
|
||||||
defaultRuntimeOptions = "iL,fL,-L,tL";
|
defaultRuntimeOptions = "iL,fL,-L,tL";
|
||||||
buildRuntimeOptions = "i8,f8,-8,t8";
|
buildRuntimeOptions = "i8,f8,-8,t8";
|
||||||
fix-stamp = git-version : ''
|
targets = "js"; # arm,java,js,php,python,riscv-32,riscv-64,ruby,x86,x86-64
|
||||||
|
#fixStamp = _: _: _: "";
|
||||||
|
fixStamp = git-version: stampYmd: stampHms: ''
|
||||||
|
echo "Fixing timestamp recipe in Makefile"
|
||||||
substituteInPlace configure \
|
substituteInPlace configure \
|
||||||
--replace "$(grep '^PACKAGE_VERSION=.*$' configure)" 'PACKAGE_VERSION="v${git-version}"' \
|
--replace "$(grep '^PACKAGE_VERSION=.*$' configure)" 'PACKAGE_VERSION="v${git-version}"' \
|
||||||
--replace "$(grep '^PACKAGE_STRING=.*$' configure)" 'PACKAGE_STRING="Gambit v${git-version}"' ;
|
--replace "$(grep '^PACKAGE_STRING=.*$' configure)" 'PACKAGE_STRING="Gambit v${git-version}"' ;
|
||||||
|
substituteInPlace include/makefile.in \
|
||||||
|
--replace "echo > stamp.h;" "(echo '#define ___STAMP_VERSION \"${git-version}\"'; echo '#define ___STAMP_YMD ${toString stampYmd}'; echo '#define ___STAMP_HMS ${toString stampHms}';) > stamp.h;";
|
||||||
'';
|
'';
|
||||||
targets = "arm,java,js,php,python,riscv-32,riscv-64,ruby,x86,x86-64"; # eats 100% cpu on _digest
|
modules = true;
|
||||||
modules = false;
|
extraOptions = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
unstable-params = stable-params // {
|
||||||
|
stable = false;
|
||||||
|
extraOptions = ["--enable-trust-c-tco"];
|
||||||
};
|
};
|
||||||
|
|
||||||
export-gambopt = params : "export GAMBOPT=${params.buildRuntimeOptions} ;";
|
export-gambopt = params : "export GAMBOPT=${params.buildRuntimeOptions} ;";
|
||||||
|
|
Loading…
Reference in a new issue