about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/gcc/4.9/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/gcc/4.9/default.nix')
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/4.9/default.nix16
1 files changed, 8 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/development/compilers/gcc/4.9/default.nix b/nixpkgs/pkgs/development/compilers/gcc/4.9/default.nix
index 709288559d1c..a15cb770fdfa 100644
--- a/nixpkgs/pkgs/development/compilers/gcc/4.9/default.nix
+++ b/nixpkgs/pkgs/development/compilers/gcc/4.9/default.nix
@@ -4,6 +4,7 @@
 , langObjCpp ? stdenv.targetPlatform.isDarwin
 , langJava ? false
 , langGo ? false
+, reproducibleBuild ? true
 , profiledCompiler ? false
 , langJit ? false
 , staticCompiler ? false
@@ -58,6 +59,10 @@ assert langGo -> langCC;
 # threadsCross is just for MinGW
 assert threadsCross != null -> stdenv.targetPlatform.isWindows;
 
+# profiledCompiler builds inject non-determinism in one of the compilation stages.
+# If turned on, we can't provide reproducible builds anymore
+assert reproducibleBuild -> profiledCompiler == false;
+
 with lib;
 with builtins;
 
@@ -204,13 +209,12 @@ stdenv.mkDerivation ({
 
   preConfigure = import ../common/pre-configure.nix {
     inherit lib;
-    inherit version hostPlatform langJava langGo;
+    inherit version targetPlatform hostPlatform langJava langGo;
   };
 
   dontDisableStatic = true;
 
-  # TODO(@Ericson2314): Always pass "--target" and always prefix.
-  configurePlatforms = [ "build" "host" ] ++ lib.optional (targetPlatform != hostPlatform) "target";
+  configurePlatforms = [ "build" "host" "target" ];
 
   configureFlags = import ../common/configure-flags.nix {
     inherit
@@ -317,11 +321,7 @@ stdenv.mkDerivation ({
 
     maintainers = with lib.maintainers; [ peti veprbl ];
 
-    platforms =
-      lib.platforms.linux ++
-      lib.platforms.freebsd ++
-      lib.platforms.illumos ++
-      lib.platforms.darwin;
+    platforms = lib.platforms.unix;
     badPlatforms = [ "x86_64-darwin" ];
   };
 }