diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-05-05 22:26:01 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2020-05-06 23:12:17 -0500 |
commit | fe1955588a5a6715178070ad1164a115aa9de1e0 (patch) | |
tree | 6ded5c6b4fa4214f3462c75ed7216fbe41a3ce09 /pkgs/development/compilers | |
parent | 9c4fbf9cb18bc37fab7d498ac4dc586f53a90194 (diff) | |
download | nixlib-fe1955588a5a6715178070ad1164a115aa9de1e0.tar nixlib-fe1955588a5a6715178070ad1164a115aa9de1e0.tar.gz nixlib-fe1955588a5a6715178070ad1164a115aa9de1e0.tar.bz2 nixlib-fe1955588a5a6715178070ad1164a115aa9de1e0.tar.lz nixlib-fe1955588a5a6715178070ad1164a115aa9de1e0.tar.xz nixlib-fe1955588a5a6715178070ad1164a115aa9de1e0.tar.zst nixlib-fe1955588a5a6715178070ad1164a115aa9de1e0.zip |
gcc: add langJit option for gcclangjit
This option can be used to set the “jit” language which enable the libgccjit functionality. Also adds a “libgccjit” attr which is gcc built with just jit enabled.
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/gcc/4.8/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.9/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 10 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/7/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/8/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/9/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/common/configure-flags.nix | 4 |
7 files changed, 20 insertions, 10 deletions
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 7e8870cf2e24..b35b69e87e1e 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -5,6 +5,7 @@ , langJava ? false , langGo ? false , profiledCompiler ? false +, langJit ? false , staticCompiler ? false , enableShared ? true , enableLTO ? true @@ -212,6 +213,7 @@ stdenv.mkDerivation ({ langGo langObjC langObjCpp + langJit ; }; diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index dd448ccbe5f9..f7fbe1ec554b 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -5,6 +5,7 @@ , langJava ? false , langGo ? false , profiledCompiler ? false +, langJit ? false , staticCompiler ? false , enableShared ? true , enableLTO ? true @@ -224,6 +225,7 @@ stdenv.mkDerivation ({ langGo langObjC langObjCpp + langJit ; }; diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index d5bb7aa8f4a4..173ca128ee0b 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -6,6 +6,7 @@ , langJava ? false , langGo ? false , profiledCompiler ? false +, langJit ? false , staticCompiler ? false , enableShared ? true , enableLTO ? true @@ -126,7 +127,7 @@ stdenv.mkDerivation ({ inherit patches; - outputs = if langJava || langGo then ["out" "man" "info"] + outputs = if langJava || langGo || langJit then ["out" "man" "info"] else [ "out" "lib" "man" "info" ]; setOutputFlags = false; NIX_NO_SELF_RPATH = true; @@ -136,13 +137,9 @@ stdenv.mkDerivation ({ hardeningDisable = [ "format" "pie" ]; prePatch = - (stdenv.lib.optionalString (langJava || langGo) '' - export lib=$out - '') - # This should kill all the stdinc frameworks that gcc and friends like to # insert into default search paths. - + stdenv.lib.optionalString hostPlatform.isDarwin '' + stdenv.lib.optionalString hostPlatform.isDarwin '' substituteInPlace gcc/config/darwin-c.c \ --replace 'if (stdinc)' 'if (0)' @@ -244,6 +241,7 @@ stdenv.mkDerivation ({ langGo langObjC langObjCpp + langJit ; }; diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 59ae40e6fa06..9153268a12b3 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -4,6 +4,7 @@ , langObjCpp ? stdenv.targetPlatform.isDarwin , langGo ? false , profiledCompiler ? false +, langJit ? false , staticCompiler ? false , enableShared ? true , enableLTO ? true @@ -90,7 +91,7 @@ stdenv.mkDerivation ({ inherit patches; - outputs = [ "out" "lib" "man" "info" ]; + outputs = [ "out" "man" "info" ] ++ stdenv.lib.optional (!langJit) "lib"; setOutputFlags = false; NIX_NO_SELF_RPATH = true; @@ -206,6 +207,7 @@ stdenv.mkDerivation ({ langGo langObjC langObjCpp + langJit ; } ++ optional (targetPlatform.isAarch64) "--enable-fix-cortex-a53-843419" ++ optional targetPlatform.isNetBSD "--disable-libcilkrts" diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index ce0cf8c2540d..e3091a062be8 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -4,6 +4,7 @@ , langObjCpp ? stdenv.targetPlatform.isDarwin , langGo ? false , profiledCompiler ? false +, langJit ? false , staticCompiler ? false , enableShared ? true , enableLTO ? true @@ -82,7 +83,7 @@ stdenv.mkDerivation ({ inherit patches; - outputs = [ "out" "lib" "man" "info" ]; + outputs = [ "out" "man" "info" ] ++ stdenv.lib.optional (!langJit) "lib"; setOutputFlags = false; NIX_NO_SELF_RPATH = true; @@ -197,6 +198,7 @@ stdenv.mkDerivation ({ langGo langObjC langObjCpp + langJit ; }; diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix index 9a0fdb6f29e6..7a5535e2a89a 100644 --- a/pkgs/development/compilers/gcc/9/default.nix +++ b/pkgs/development/compilers/gcc/9/default.nix @@ -5,6 +5,7 @@ , langObjCpp ? stdenv.targetPlatform.isDarwin , langGo ? false , profiledCompiler ? false +, langJit ? false , staticCompiler ? false , enableShared ? true , enableLTO ? true @@ -85,7 +86,7 @@ stdenv.mkDerivation ({ inherit patches; - outputs = [ "out" "man" "info" ] ++ lib.optional langJit "lib"; + outputs = [ "out" "man" "info" ] ++ stdenv.lib.optional (!langJit) "lib"; setOutputFlags = false; NIX_NO_SELF_RPATH = true; @@ -202,6 +203,7 @@ stdenv.mkDerivation ({ langGo langObjC langObjCpp + langJit ; }; diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index c78a28148951..fd2c8c4c6849 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -20,6 +20,7 @@ , langGo , langObjC , langObjCpp +, langJit }: assert cloog != null -> stdenv.lib.versionOlder version "5"; @@ -121,6 +122,7 @@ let ++ lib.optional langObjC "objc" ++ lib.optional langObjCpp "obj-c++" ++ lib.optionals crossDarwin [ "objc" "obj-c++" ] + ++ lib.optional langJit "jit" ) ) }" @@ -173,7 +175,7 @@ let "--disable-symvers" "libat_cv_have_ifunc=no" "--disable-gnu-indirect-function" - ] + ] ++ lib.optional langJit "--enable-host-shared" ; in configureFlags |