about summary refs log tree commit diff
path: root/pkgs/development/compilers/gambit
diff options
context:
space:
mode:
authorFrancois-Rene Rideau <fare@tunes.org>2020-10-21 00:08:26 -0400
committerFrancois-Rene Rideau <fare@tunes.org>2020-11-06 12:03:59 -0500
commit0febc5788322885bf5dcb092044f3d5cd29385bf (patch)
treed2717c2c5e46b1db59918436facb99f164189955 /pkgs/development/compilers/gambit
parent65a90770955a27f5a5b73649526bb0e1770183d1 (diff)
gambit: support targets, modules
Diffstat (limited to 'pkgs/development/compilers/gambit')
-rw-r--r--pkgs/development/compilers/gambit/build.nix2
-rw-r--r--pkgs/development/compilers/gambit/gambit-support.nix6
2 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/development/compilers/gambit/build.nix b/pkgs/development/compilers/gambit/build.nix
index c6a48bd744e75..a4b884147db17 100644
--- a/pkgs/development/compilers/gambit/build.nix
+++ b/pkgs/development/compilers/gambit/build.nix
@@ -35,6 +35,7 @@ gccStdenv.mkDerivation rec {
   #runtimeDeps = [ gnused gnugrep ];
 
   configureFlags = [
+    "--enable-targets=${gambit-params.targets}"
     "--enable-single-host"
     "--enable-c-opt=${optimizationSetting}"
     "--enable-gcc-opts"
@@ -94,6 +95,7 @@ gccStdenv.mkDerivation rec {
 
     # Now use the bootstrap compiler to build the real thing!
     make -j$NIX_BUILD_CORES from-scratch
+    ${lib.optionalString gambit-params.modules "make -j$NIX_BUILD_CORES modules"}
   '';
 
   postInstall = ''
diff --git a/pkgs/development/compilers/gambit/gambit-support.nix b/pkgs/development/compilers/gambit/gambit-support.nix
index 0e78831f2e4eb..be745367ec03b 100644
--- a/pkgs/development/compilers/gambit/gambit-support.nix
+++ b/pkgs/development/compilers/gambit/gambit-support.nix
@@ -2,12 +2,16 @@
 
 rec {
   stable-params = {
+    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";
     buildRuntimeOptions = "i8,f8,-8,t8";
     fix-stamp = git-version : ''
@@ -15,6 +19,8 @@ rec {
         --replace "$(grep '^PACKAGE_VERSION=.*$' configure)" 'PACKAGE_VERSION="v${git-version}"' \
         --replace "$(grep '^PACKAGE_STRING=.*$' configure)" 'PACKAGE_STRING="Gambit v${git-version}"' ;
     '';
+    targets = "arm,java,js,php,python,riscv-32,riscv-64,ruby,x86,x86-64"; # eats 100% cpu on _digest
+    modules = false;
   };
 
   export-gambopt = params : "export GAMBOPT=${params.buildRuntimeOptions} ;";