diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-05 17:58:16 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-05 17:58:16 -0500 |
commit | 43d5c5d6db3ce33f3cf1d17ba43c7374257466ec (patch) | |
tree | 3d24a5c3adc8f42ee14084889f2d9a9acaef5ef1 /pkgs/development/compilers/gcc | |
parent | 992bd2f6d34b2f560fc17df6fa3708fcade1abac (diff) | |
parent | 703a9f93c1254f7bdf0350ca0462de0d78033c62 (diff) | |
download | nixlib-43d5c5d6db3ce33f3cf1d17ba43c7374257466ec.tar nixlib-43d5c5d6db3ce33f3cf1d17ba43c7374257466ec.tar.gz nixlib-43d5c5d6db3ce33f3cf1d17ba43c7374257466ec.tar.bz2 nixlib-43d5c5d6db3ce33f3cf1d17ba43c7374257466ec.tar.lz nixlib-43d5c5d6db3ce33f3cf1d17ba43c7374257466ec.tar.xz nixlib-43d5c5d6db3ce33f3cf1d17ba43c7374257466ec.tar.zst nixlib-43d5c5d6db3ce33f3cf1d17ba43c7374257466ec.zip |
Merge commit '703a9f93c1254f7bdf0350ca0462de0d78033c62' into gcc-simplify-flags
Diffstat (limited to 'pkgs/development/compilers/gcc')
-rw-r--r-- | pkgs/development/compilers/gcc/4.8/default.nix | 22 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.9/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/5/default.nix | 14 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 8 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/7/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/snapshot/default.nix | 4 |
6 files changed, 28 insertions, 26 deletions
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index d40b9f9d5b14..51fb1a1c9a1e 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -184,7 +184,7 @@ let version = "4.8.5"; stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; - bootstrap = targetPlatform == hostPlatform && !hostPlatform.isArm && !hostPlatform.isMips; + bootstrap = targetPlatform == hostPlatform; in @@ -341,14 +341,6 @@ stdenv.mkDerivation ({ }" ] ++ - # Optional features - optional (isl != null) "--with-isl=${isl}" ++ - optionals (cloog != null) [ - "--with-cloog=${cloog}" - "--disable-cloog-version-check" - "--enable-cloog-backend=isl" - ] ++ - (if enableMultilib then ["--enable-multilib" "--disable-libquadmath"] else ["--disable-multilib"]) ++ @@ -357,6 +349,14 @@ stdenv.mkDerivation ({ then ["--enable-plugin"] else ["--disable-plugin"]) ++ + # Optional features + optional (isl != null) "--with-isl=${isl}" ++ + optionals (cloog != null) [ + "--with-cloog=${cloog}" + "--disable-cloog-version-check" + "--enable-cloog-backend=isl" + ] ++ + # Java options optionals langJava [ "--with-ecj-jar=${javaEcj}" @@ -444,7 +444,7 @@ stdenv.mkDerivation ({ STRIP_FOR_TARGET = "${targetPlatform.config}-strip"; CC_FOR_TARGET = "${targetPlatform.config}-gcc"; CXX_FOR_TARGET = "${targetPlatform.config}-g++"; - # If we are making a cross compiler, cross != null + # If we are making a cross compiler, targetPlatform != hostPlatform NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; buildFlags = ""; @@ -490,7 +490,7 @@ stdenv.mkDerivation ({ EXTRA_TARGET_CFLAGS = if targetPlatform != hostPlatform && libcCross != null then [ - "-idirafter ${libcCross.dev}/include" + "-idirafter ${getDev libcCross}/include" ] ++ optionals (! crossStageStatic) [ "-B${libcCross.out}/lib" diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 5f889672f7bb..57d173c3a144 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -442,7 +442,7 @@ stdenv.mkDerivation ({ STRIP_FOR_TARGET = "${targetPlatform.config}-strip"; CC_FOR_TARGET = "${targetPlatform.config}-gcc"; CXX_FOR_TARGET = "${targetPlatform.config}-g++"; - # If we are making a cross compiler, cross != null + # If we are making a cross compiler, targetPlatform != hostPlatform NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; buildFlags = ""; @@ -488,7 +488,7 @@ stdenv.mkDerivation ({ EXTRA_TARGET_CFLAGS = if targetPlatform != hostPlatform && libcCross != null then [ - "-idirafter ${libcCross.dev}/include" + "-idirafter ${getDev libcCross}/include" ] ++ optionals (! crossStageStatic) [ "-B${libcCross.out}/lib" diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 30bfd641c6ca..a34d14e88021 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -199,8 +199,6 @@ stdenv.mkDerivation ({ inherit sha256; }; - hardeningDisable = [ "format" ]; - inherit patches; outputs = [ "out" "lib" "man" "info" ]; @@ -209,6 +207,8 @@ stdenv.mkDerivation ({ libc_dev = stdenv.cc.libc_dev; + hardeningDisable = [ "format" ]; + # This should kill all the stdinc frameworks that gcc and friends like to # insert into default search paths. prePatch = stdenv.lib.optionalString hostPlatform.isDarwin '' @@ -354,9 +354,6 @@ stdenv.mkDerivation ({ }" ] ++ - # Optional features - optional (isl != null) "--with-isl=${isl}" ++ - (if enableMultilib then ["--enable-multilib" "--disable-libquadmath"] else ["--disable-multilib"]) ++ @@ -365,6 +362,9 @@ stdenv.mkDerivation ({ then ["--enable-plugin"] else ["--disable-plugin"]) ++ + # Optional features + optional (isl != null) "--with-isl=${isl}" ++ + # Java options optionals langJava [ "--with-ecj-jar=${javaEcj}" @@ -452,7 +452,7 @@ stdenv.mkDerivation ({ STRIP_FOR_TARGET = "${targetPlatform.config}-strip"; CC_FOR_TARGET = "${targetPlatform.config}-gcc"; CXX_FOR_TARGET = "${targetPlatform.config}-g++"; - # If we are making a cross compiler, cross != null + # If we are making a cross compiler, targetPlatform != hostPlatform NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; buildFlags = ""; @@ -478,7 +478,7 @@ stdenv.mkDerivation ({ CPATH = makeSearchPathOutput "dev" "include" ([] ++ optional (zlib != null) zlib - ++ optionals langJava [ boehmgc ] + ++ optional langJava boehmgc ++ optionals javaAwtGtk xlibs ++ optionals javaAwtGtk [ gmp mpfr ] ++ optional (libpthread != null) libpthread diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 17086fdb7b8b..61e7647f968f 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -179,7 +179,7 @@ let version = "6.4.0"; stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; - bootstrap = targetPlatform == hostPlatform; + bootstrap = targetPlatform == hostPlatform; in @@ -381,7 +381,7 @@ stdenv.mkDerivation ({ # Ada optional langAda "--enable-libada" ++ - # Cross compilation + # Cross-compilation optional (targetPlatform == hostPlatform) ( let incDir = if hostPlatform.isDarwin then "${darwin.usr-include}" @@ -395,7 +395,7 @@ stdenv.mkDerivation ({ # Platform-specific flags optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ - optionals (hostPlatform.isSunOS) [ + optionals hostPlatform.isSunOS [ "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit" # On Illumos/Solaris GNU as is preferred "--with-gnu-as" "--without-gnu-ld" @@ -452,7 +452,7 @@ stdenv.mkDerivation ({ STRIP_FOR_TARGET = "${targetPlatform.config}-strip"; CC_FOR_TARGET = "${targetPlatform.config}-gcc"; CXX_FOR_TARGET = "${targetPlatform.config}-g++"; - # If we are making a cross compiler, cross != null + # If we are making a cross compiler, targetPlatform != hostPlatform NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; buildFlags = ""; diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 38aaf3f65075..48b245c1006f 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -447,7 +447,7 @@ stdenv.mkDerivation ({ CC_FOR_TARGET = "${targetPlatform.config}-gcc"; CXX_FOR_TARGET = "${targetPlatform.config}-g++"; # If we are making a cross compiler, targetPlatform != hostPlatform - NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else ""; + NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; buildFlags = ""; }; diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index 68a9704c0a53..981ac44d1b19 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -433,7 +433,7 @@ stdenv.mkDerivation ({ STRIP_FOR_TARGET = "${targetPlatform.config}-strip"; CC_FOR_TARGET = "${targetPlatform.config}-gcc"; CXX_FOR_TARGET = "${targetPlatform.config}-g++"; - # If we are making a cross compiler, cross != null + # If we are making a cross compiler, targetPlatform != hostPlatform NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; buildFlags = ""; @@ -532,6 +532,8 @@ stdenv.mkDerivation ({ stdenv.lib.platforms.linux ++ stdenv.lib.platforms.freebsd ++ optionals (langAda == false) stdenv.lib.platforms.darwin; + + broken = true; }; } |