diff options
Diffstat (limited to 'pkgs/development/compilers/gambit/build.nix')
-rw-r--r-- | pkgs/development/compilers/gambit/build.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/development/compilers/gambit/build.nix b/pkgs/development/compilers/gambit/build.nix index 33391c15696..60b9fb792d2 100644 --- a/pkgs/development/compilers/gambit/build.nix +++ b/pkgs/development/compilers/gambit/build.nix @@ -5,7 +5,8 @@ stampYmd ? 0, stampHms ? 0, gambit-support, optimizationSetting ? "-O1", - gambit-params ? pkgs.gambit-support.stable-params }: + gambit-params ? pkgs.gambit-support.stable-params, + rev ? git-version }: # Note that according to a benchmark run by Marc Feeley on May 2018, # clang is 10x (with default settings) to 15% (with -O2) slower than GCC at compiling @@ -30,6 +31,11 @@ gccStdenv.mkDerivation rec { inherit src version git-version; bootstrap = gambit-support.gambit-bootstrap; + passthru = { + inherit src version git-version rev stampYmd stampHms optimizationSetting openssl; + }; + + nativeBuildInputs = [ git autoconf ]; # TODO: if/when we can get all the library packages we depend on to have static versions, @@ -47,6 +53,7 @@ gccStdenv.mkDerivation rec { "--enable-c-opt=${optimizationSetting}" "--enable-c-opt-rts=-O2" "--enable-gcc-opts" + "--enable-trust-c-tco" "--enable-shared" "--enable-absolute-shared-libs" # Yes, NixOS will want an absolute path, and fix it. "--enable-openssl" @@ -70,6 +77,9 @@ gccStdenv.mkDerivation rec { # "--enable-char-size=1" # default is 4 # "--enable-march=native" # Nope, makes it not work on machines older than the builder ] ++ gambit-params.extraOptions + # TODO: pick an appropriate architecture to optimize on on x86-64? + # https://gcc.gnu.org/onlinedocs/gcc-4.8.4/gcc/i386-and-x86-64-Options.html#i386-and-x86-64-Options + # ++ lib.optional pkgs.stdenv.isx86_64 "--enable-march=core-avx2" # Do not enable poll on darwin due to https://github.com/gambit/gambit/issues/498 ++ lib.optional (!gccStdenv.isDarwin) "--enable-poll"; |