diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2017-08-09 19:35:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-09 19:35:07 +0200 |
commit | c839b6ce0ae75537f557202f941000662c7ac2d7 (patch) | |
tree | 961e049934bccbf48641296c6704d29cea7b7f3c /pkgs | |
parent | 10bcf0818f47b460d73c812ba50a2d50884bacd2 (diff) | |
parent | bc5160eacde131d83c3a25827963a676d1391abe (diff) | |
download | nixlib-c839b6ce0ae75537f557202f941000662c7ac2d7.tar nixlib-c839b6ce0ae75537f557202f941000662c7ac2d7.tar.gz nixlib-c839b6ce0ae75537f557202f941000662c7ac2d7.tar.bz2 nixlib-c839b6ce0ae75537f557202f941000662c7ac2d7.tar.lz nixlib-c839b6ce0ae75537f557202f941000662c7ac2d7.tar.xz nixlib-c839b6ce0ae75537f557202f941000662c7ac2d7.tar.zst nixlib-c839b6ce0ae75537f557202f941000662c7ac2d7.zip |
Merge pull request #28050 from LnL7/darwin-gcc
gcc and gdb: fix clang build
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/compilers/gcc/5/default.nix | 8 | ||||
-rw-r--r-- | pkgs/development/tools/misc/gdb/default.nix | 7 |
2 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index e95ef92c3f65..c9780077835e 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -325,7 +325,13 @@ stdenv.mkDerivation ({ NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl"; - preConfigure = stdenv.lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' + 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) '' 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" diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix index 02ff52155b1c..410fd36ef252 100644 --- a/pkgs/development/tools/misc/gdb/default.nix +++ b/pkgs/development/tools/misc/gdb/default.nix @@ -66,6 +66,13 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional (!pythonSupport) "--without-python" ++ stdenv.lib.optional multitarget "--enable-targets=all"; + preConfigure = + # Not sure why this is causing problems, now that the stdenv + # exports CPP=cpp the build fails with strange errors on darwin. + stdenv.lib.optionalString stdenv.cc.isClang '' + unset CPP + ''; + postInstall = '' # Remove Info files already provided by Binutils and other packages. rm -v $out/share/info/bfd.info |