Skip to content

Commit

Permalink
get rid of nasty CC stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Taylor committed Aug 24, 2014
1 parent 90b943f commit 1926162
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion pkgs/development/interpreters/lua-5/5.1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
configurePhase =
if stdenv.isDarwin
then ''
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2" LDFLAGS="" CC=clang )
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2" LDFLAGS="" CC="$CC" )
installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.5.1.5.dylib" INSTALL_DATA='cp -d' )
'' else ''
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC" LDFLAGS="-fPIC" )
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/gmp/5.1.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ stdenv.mkDerivation (rec {
++ (if cxx then [ "--enable-cxx" ]
else [ "--disable-cxx" ])
++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
++ optional stdenv.isDarwin "ABI=64 CC=clang"
++ optional stdenv.isDarwin "ABI=64"
++ optional stdenv.is64bit "--with-pic"
;

Expand Down
2 changes: 0 additions & 2 deletions pkgs/development/libraries/qt-4.x/4.8/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ stdenv.mkDerivation rec {
-translationdir $out/share/${name}/translations
"
'' + optionalString stdenv.isDarwin ''
export CXX=clang++
export CC=clang
sed -i 's/QMAKE_CC = gcc/QMAKE_CC = clang/' mkspecs/common/g++-base.conf
sed -i 's/QMAKE_CXX = g++/QMAKE_CXX = clang++/' mkspecs/common/g++-base.conf
'';
Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/libraries/zlib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ stdenv.mkDerivation rec {

configureFlags = if static then "" else "--shared";

preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
export CC=clang
'' + ''
preConfigure = ''
if test -n "$crossConfig"; then
export CC=$crossConfig-gcc
configureFlags=${if static then "" else "--shared"}
Expand Down
5 changes: 3 additions & 2 deletions pkgs/tools/misc/getopt/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ stdenv.mkDerivation {
url = http://tarballs.nixos.org/getopt-1.1.4.tar.gz;
md5 = "02188ca68da27c4175d6e9f3da732101";
};

buildFlags = stdenv.lib.optional stdenv.isDarwin [ "CC=clang" ];
preBuild = ''
export buildFlags=CC="$CC" # for darwin
'';
}
7 changes: 4 additions & 3 deletions pkgs/tools/package-management/nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ stdenv.mkDerivation rec {
postUnpack =
'' export CPATH="${bzip2}/include"
export LIBRARY_PATH="${bzip2}/lib"
export CXX=/usr/bin/clang++
export CXXFLAGS="-O3 -Wno-error=reserved-user-defined-literal"
'';

configureFlags =
Expand All @@ -34,7 +32,7 @@ stdenv.mkDerivation rec {
--with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}
--disable-init-state
--enable-gc
CFLAGS=-O3
CFLAGS=-O3 CXXFLAGS=-O3
'';

makeFlags = "profiledir=$(out)/etc/profile.d";
Expand Down Expand Up @@ -68,6 +66,9 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;

meta = {
# due to builder args bug; see
# https://github.com/NixOS/nix/commit/b224ac15201c57b40ea855f5a98b1bd166c1c7f6
broken = stdenv.isDarwin;
description = "The Nix Deployment System";
homepage = http://nixos.org/;
license = stdenv.lib.licenses.lgpl2Plus;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/tools/system/tree/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ stdenv.mkDerivation {
prefix=$out
MANDIR=$out/share/man/man1
${systemFlags}
CC=clang
CC="$CC"
)
'';

Expand Down

0 comments on commit 1926162

Please sign in to comment.