From d93c6367370f6acff76260308f4e7522a41c1c9e Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Wed, 9 Aug 2017 21:37:29 +0200 Subject: [PATCH] Revert "gcc: fix clang build" This fixes the gcc build but results in a gcc that doesn't generate valid binaries. gcc -o hello hello.c ./hello Killed: 9 This reverts commit 2adf36ab8c7903e100e6e7a0a6447934ec09b10e. --- pkgs/development/compilers/gcc/5/default.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index c9780077835e..e95ef92c3f65 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -325,13 +325,7 @@ stdenv.mkDerivation ({ NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl"; - preConfigure = - # Not sure why this is causing problems, now that the stdenv - # exports CPP=cpp the build fails with strange errors on darwin. - # https://github.com/NixOS/nixpkgs/issues/27889 - stdenv.lib.optionalString stdenv.cc.isClang '' - unset CPP - '' + stdenv.lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' + preConfigure = stdenv.lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g` export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET" export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET"