lol

Revert gcc darwin fixes

This reverts commits cb7c053383ff76a454484992b3a6d6a2f1530c15,
ebda45e6b9db3225c30a998b2624d90b0c08edb4,
4a495cfbab2b3ab9ae8219ef1812c766bf27b01e because they broke Nixpkgs
evaluation.

http://hydra.nixos.org/build/24813270

+61 -41
+18 -10
pkgs/development/compilers/gcc/4.8/default.nix
··· 32 , gnat ? null 33 , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 34 , stripped ? true 35 - , CF ? null 36 }: 37 38 assert langJava -> zip != null && unzip != null ··· 47 # LTO needs libelf and zlib. 48 assert libelf != null -> zlib != null; 49 50 - # Make sure we get CoreFoundation 51 - assert stdenv.isDarwin -> CF != null; 52 53 # The go frontend is written in c++ 54 assert langGo -> langCC; ··· 288 ++ (optionals (cross != null) [binutilsCross]) 289 ++ (optionals langAda [gnatboot]) 290 ++ (optionals langVhdl [gnat]) 291 ; 292 293 NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl"; ··· 298 export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" 299 export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" 300 '' + stdenv.lib.optionalString stdenv.isDarwin '' 301 - configureFlagsArray+=( 302 - --with-sysroot="${stdenv.libc}" 303 - --with-native-system-header-dir=/include 304 - ) 305 ''; 306 307 dontDisableStatic = true; ··· 470 ++ optionals javaAwtGtk [ gmp mpfr ] 471 ++ optional (libpthread != null) libpthread))); 472 473 - extraFlags = 474 - (if cross != null && libcCross != null 475 then "-idirafter ${libcCross}/include" 476 - else "") + optionalString stdenv.isDarwin " -F${CF}/Library/Frameworks"; 477 478 EXTRA_TARGET_LDFLAGS = 479 if cross != null && libcCross != null
··· 32 , gnat ? null 33 , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 34 , stripped ? true 35 + , gnused ? null 36 }: 37 38 assert langJava -> zip != null && unzip != null ··· 47 # LTO needs libelf and zlib. 48 assert libelf != null -> zlib != null; 49 50 + # Make sure we get GNU sed. 51 + assert stdenv.isDarwin -> gnused != null; 52 53 # The go frontend is written in c++ 54 assert langGo -> langCC; ··· 288 ++ (optionals (cross != null) [binutilsCross]) 289 ++ (optionals langAda [gnatboot]) 290 ++ (optionals langVhdl [gnat]) 291 + 292 + # The builder relies on GNU sed (for instance, Darwin's `sed' fails with 293 + # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. 294 + ++ (optional stdenv.isDarwin gnused) 295 ; 296 297 NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl"; ··· 302 export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" 303 export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" 304 '' + stdenv.lib.optionalString stdenv.isDarwin '' 305 + if SDKROOT=$(/usr/bin/xcrun --show-sdk-path); then 306 + configureFlagsArray+=(--with-native-system-header-dir=$SDKROOT/usr/include) 307 + makeFlagsArray+=( \ 308 + CFLAGS_FOR_BUILD=-F$SDKROOT/System/Library/Frameworks \ 309 + CFLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ 310 + FLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ 311 + ) 312 + fi 313 ''; 314 315 dontDisableStatic = true; ··· 478 ++ optionals javaAwtGtk [ gmp mpfr ] 479 ++ optional (libpthread != null) libpthread))); 480 481 + EXTRA_TARGET_CFLAGS = 482 + if cross != null && libcCross != null 483 then "-idirafter ${libcCross}/include" 484 + else null; 485 486 EXTRA_TARGET_LDFLAGS = 487 if cross != null && libcCross != null
+18 -10
pkgs/development/compilers/gcc/4.9/default.nix
··· 32 , gnat ? null 33 , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 34 , stripped ? true 35 - , CF ? null 36 }: 37 38 assert langJava -> zip != null && unzip != null ··· 47 # LTO needs libelf and zlib. 48 assert libelf != null -> zlib != null; 49 50 - # Make sure we get CoreFoundation 51 - assert stdenv.isDarwin -> CF != null; 52 53 # The go frontend is written in c++ 54 assert langGo -> langCC; ··· 287 ++ (optionals (cross != null) [binutilsCross]) 288 ++ (optionals langAda [gnatboot]) 289 ++ (optionals langVhdl [gnat]) 290 ; 291 292 NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl"; ··· 297 export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" 298 export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" 299 '' + stdenv.lib.optionalString stdenv.isDarwin '' 300 - configureFlagsArray+=( 301 - --with-sysroot="${stdenv.libc}" 302 - --with-native-system-header-dir=/include 303 - ) 304 ''; 305 306 dontDisableStatic = true; ··· 469 ++ optionals javaAwtGtk [ gmp mpfr ] 470 ++ optional (libpthread != null) libpthread))); 471 472 - extraFlags = 473 - (if cross != null && libcCross != null 474 then "-idirafter ${libcCross}/include" 475 - else "") + optionalString stdenv.isDarwin " -F${CF}/Library/Frameworks"; 476 477 EXTRA_TARGET_LDFLAGS = 478 if cross != null && libcCross != null
··· 32 , gnat ? null 33 , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 34 , stripped ? true 35 + , gnused ? null 36 }: 37 38 assert langJava -> zip != null && unzip != null ··· 47 # LTO needs libelf and zlib. 48 assert libelf != null -> zlib != null; 49 50 + # Make sure we get GNU sed. 51 + assert stdenv.isDarwin -> gnused != null; 52 53 # The go frontend is written in c++ 54 assert langGo -> langCC; ··· 287 ++ (optionals (cross != null) [binutilsCross]) 288 ++ (optionals langAda [gnatboot]) 289 ++ (optionals langVhdl [gnat]) 290 + 291 + # The builder relies on GNU sed (for instance, Darwin's `sed' fails with 292 + # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. 293 + ++ (optional stdenv.isDarwin gnused) 294 ; 295 296 NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl"; ··· 301 export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" 302 export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" 303 '' + stdenv.lib.optionalString stdenv.isDarwin '' 304 + if SDKROOT=$(/usr/bin/xcrun --show-sdk-path); then 305 + configureFlagsArray+=(--with-native-system-header-dir=$SDKROOT/usr/include) 306 + makeFlagsArray+=( \ 307 + CFLAGS_FOR_BUILD=-F$SDKROOT/System/Library/Frameworks \ 308 + CFLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ 309 + FLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ 310 + ) 311 + fi 312 ''; 313 314 dontDisableStatic = true; ··· 477 ++ optionals javaAwtGtk [ gmp mpfr ] 478 ++ optional (libpthread != null) libpthread))); 479 480 + EXTRA_TARGET_CFLAGS = 481 + if cross != null && libcCross != null 482 then "-idirafter ${libcCross}/include" 483 + else null; 484 485 EXTRA_TARGET_LDFLAGS = 486 if cross != null && libcCross != null
+23 -10
pkgs/development/compilers/gcc/5/default.nix
··· 32 , gnat ? null 33 , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 34 , stripped ? true 35 - , CF ? null 36 }: 37 38 assert langJava -> zip != null && unzip != null ··· 44 # LTO needs libelf and zlib. 45 assert libelf != null -> zlib != null; 46 47 - # Make sure we get CoreFoundation. 48 - assert stdenv.isDarwin -> CF != null; 49 50 # The go frontend is written in c++ 51 assert langGo -> langCC; ··· 282 ++ (optionals (cross != null) [binutilsCross]) 283 ++ (optionals langAda [gnatboot]) 284 ++ (optionals langVhdl [gnat]) 285 ; 286 287 NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl"; ··· 292 export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" 293 export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" 294 '' + stdenv.lib.optionalString stdenv.isDarwin '' 295 - configureFlagsArray+=( 296 - --with-sysroot="${stdenv.libc}" 297 - --with-native-system-header-dir=/include 298 - ) 299 ''; 300 301 dontDisableStatic = true; ··· 462 ++ optionals javaAwtGtk [ gmp mpfr ] 463 ++ optional (libpthread != null) libpthread))); 464 465 - extraFlags = 466 - (if cross != null && libcCross != null 467 then "-idirafter ${libcCross}/include" 468 - else "") + optionalString stdenv.isDarwin " -F${CF}/Library/Frameworks"; 469 470 EXTRA_TARGET_LDFLAGS = 471 if cross != null && libcCross != null
··· 32 , gnat ? null 33 , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 34 , stripped ? true 35 + , gnused ? null 36 + , binutils ? null 37 }: 38 39 assert langJava -> zip != null && unzip != null ··· 45 # LTO needs libelf and zlib. 46 assert libelf != null -> zlib != null; 47 48 + # Make sure we get GNU sed. 49 + assert stdenv.isDarwin -> gnused != null; 50 + 51 + # Need c++filt on darwin 52 + assert stdenv.isDarwin -> binutils != null; 53 54 # The go frontend is written in c++ 55 assert langGo -> langCC; ··· 286 ++ (optionals (cross != null) [binutilsCross]) 287 ++ (optionals langAda [gnatboot]) 288 ++ (optionals langVhdl [gnat]) 289 + 290 + # The builder relies on GNU sed (for instance, Darwin's `sed' fails with 291 + # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. 292 + ++ (optional stdenv.isDarwin gnused) 293 + ++ (optional stdenv.isDarwin binutils) 294 ; 295 296 NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl"; ··· 301 export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" 302 export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" 303 '' + stdenv.lib.optionalString stdenv.isDarwin '' 304 + if SDKROOT=$(/usr/bin/xcrun --show-sdk-path); then 305 + configureFlagsArray+=(--with-native-system-header-dir=$SDKROOT/usr/include) 306 + makeFlagsArray+=( \ 307 + CFLAGS_FOR_BUILD=-F$SDKROOT/System/Library/Frameworks \ 308 + CFLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ 309 + FLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ 310 + ) 311 + fi 312 ''; 313 314 dontDisableStatic = true; ··· 475 ++ optionals javaAwtGtk [ gmp mpfr ] 476 ++ optional (libpthread != null) libpthread))); 477 478 + EXTRA_TARGET_CFLAGS = 479 + if cross != null && libcCross != null 480 then "-idirafter ${libcCross}/include" 481 + else null; 482 483 EXTRA_TARGET_LDFLAGS = 484 if cross != null && libcCross != null
+2 -5
pkgs/development/compilers/gcc/builder.sh
··· 23 24 # Figure out what extra flags to pass to the gcc compilers 25 # being generated to make sure that they use our glibc. 26 - extraFlags="$(cat $NIX_CC/nix-support/libc-cflags) ${extraFlags}" 27 - extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags)" 28 - if [ -e "$NIX_CC/nix-support/libc-ldflags-before" ]; then 29 - extraLDFlags+=" $(cat $NIX_CC/nix-support/libc-ldflags-before)" 30 - fi 31 32 # Use *real* header files, otherwise a limits.h is generated 33 # that does not include Glibc's limits.h (notably missing
··· 23 24 # Figure out what extra flags to pass to the gcc compilers 25 # being generated to make sure that they use our glibc. 26 + extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)" 27 + extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)" 28 29 # Use *real* header files, otherwise a limits.h is generated 30 # that does not include Glibc's limits.h (notably missing
-6
pkgs/top-level/all-packages.nix
··· 3866 libcCross = if crossSystem != null then libcCross else null; 3867 3868 isl = isl_0_14; 3869 - 3870 - inherit (darwin) CF; 3871 })); 3872 3873 gcc49 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.9 { ··· 3885 isl = isl_0_11; 3886 3887 cloog = cloog_0_18_0; 3888 - 3889 - inherit (darwin) CF; 3890 })); 3891 3892 gcc5 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/5 { ··· 3902 libcCross = if crossSystem != null then libcCross else null; 3903 3904 isl = isl_0_14; 3905 - 3906 - inherit (darwin) CF; 3907 })); 3908 3909 gfortran = if !stdenv.isDarwin then gfortran49
··· 3866 libcCross = if crossSystem != null then libcCross else null; 3867 3868 isl = isl_0_14; 3869 })); 3870 3871 gcc49 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.9 { ··· 3883 isl = isl_0_11; 3884 3885 cloog = cloog_0_18_0; 3886 })); 3887 3888 gcc5 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/5 { ··· 3898 libcCross = if crossSystem != null then libcCross else null; 3899 3900 isl = isl_0_14; 3901 })); 3902 3903 gfortran = if !stdenv.isDarwin then gfortran49