diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix index 330f8a7cf8e..fad198b1f5c 100644 --- a/pkgs/development/compilers/gcc/4.6/default.nix +++ b/pkgs/development/compilers/gcc/4.6/default.nix @@ -170,7 +170,7 @@ let version = "4.6.4"; "-stage-final"; crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; - bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips; + bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips && !stdenv.isDarwin; in diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 32a43a24efd..42fd4bec2eb 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -70,7 +70,8 @@ let version = "4.8.5"; # The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its # target libraries and tools. ++ optional langAda ../gnat-cflags.patch - ++ optional langFortran ../gfortran-driving.patch; + ++ optional langFortran ../gfortran-driving.patch + ++ optional stdenv.isDarwin ../gfortran-darwin-NXConstStr.patch; javaEcj = fetchurl { # The `$(top_srcdir)/ecj.jar' file is automatically picked up at @@ -197,7 +198,7 @@ let version = "4.8.5"; stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; - bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips; + bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips && !stdenv.isDarwin; in @@ -304,15 +305,6 @@ stdenv.mkDerivation ({ export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET" export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" - '' + stdenv.lib.optionalString stdenv.isDarwin '' - if SDKROOT=$(/usr/bin/xcrun --show-sdk-path); then - configureFlagsArray+=(--with-native-system-header-dir=$SDKROOT/usr/include) - makeFlagsArray+=( \ - CFLAGS_FOR_BUILD=-F$SDKROOT/System/Library/Frameworks \ - CFLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ - FLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ - ) - fi ''; dontDisableStatic = true; diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 6a9078fefce..475349ed4ba 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -199,7 +199,7 @@ let version = "4.9.3"; stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; - bootstrap = cross == null; + bootstrap = cross == null && !stdenv.isDarwin; in @@ -307,15 +307,6 @@ stdenv.mkDerivation ({ export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET" export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" - '' + stdenv.lib.optionalString stdenv.isDarwin '' - if SDKROOT=$(/usr/bin/xcrun --show-sdk-path); then - configureFlagsArray+=(--with-native-system-header-dir=$SDKROOT/usr/include) - makeFlagsArray+=( \ - CFLAGS_FOR_BUILD=-F$SDKROOT/System/Library/Frameworks \ - CFLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ - FLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ - ) - fi '' + stdenv.lib.optionalString (langJava || langGo) '' export lib=$out; diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 9ab725e2da8..4802c3fe278 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -199,7 +199,7 @@ let version = "5.4.0"; stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; - bootstrap = cross == null; + bootstrap = cross == null && !stdenv.isDarwin; in @@ -307,15 +307,6 @@ stdenv.mkDerivation ({ export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET" export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" - '' + stdenv.lib.optionalString stdenv.isDarwin '' - if SDKROOT=$(/usr/bin/xcrun --show-sdk-path); then - configureFlagsArray+=(--with-native-system-header-dir=$SDKROOT/usr/include) - makeFlagsArray+=( \ - CFLAGS_FOR_BUILD=-F$SDKROOT/System/Library/Frameworks \ - CFLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ - FLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ - ) - fi ''; dontDisableStatic = true; diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index d281488fd50..e87554c25ab 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -198,7 +198,7 @@ let version = "6.1.0"; stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; - bootstrap = cross == null; + bootstrap = cross == null && !stdenv.isDarwin; in @@ -306,15 +306,6 @@ stdenv.mkDerivation ({ export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET" export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" - '' + stdenv.lib.optionalString stdenv.isDarwin '' - if SDKROOT=$(/usr/bin/xcrun --show-sdk-path); then - configureFlagsArray+=(--with-native-system-header-dir=$SDKROOT/usr/include) - makeFlagsArray+=( \ - CFLAGS_FOR_BUILD=-F$SDKROOT/System/Library/Frameworks \ - CFLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ - FLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ - ) - fi ''; dontDisableStatic = true; diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index 6b09cfd59ed..0371630f3f6 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -226,19 +226,21 @@ postInstall() { # More dependencies with the previous gcc or some libs (gccbug stores the build command line) rm -rf $out/bin/gccbug - # Take out the bootstrap-tools from the rpath, as it's not needed at all having $out - for i in $(find "$out"/libexec/gcc/*/*/* -type f -a \! -name '*.la'); do - PREV_RPATH=`patchelf --print-rpath "$i"` - NEW_RPATH=`echo "$PREV_RPATH" | sed 's,:[^:]*bootstrap-tools/lib,,g'` - patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK - done + if type "patchelf"; then + # Take out the bootstrap-tools from the rpath, as it's not needed at all having $out + for i in $(find "$out"/libexec/gcc/*/*/* -type f -a \! -name '*.la'); do + PREV_RPATH=`patchelf --print-rpath "$i"` + NEW_RPATH=`echo "$PREV_RPATH" | sed 's,:[^:]*bootstrap-tools/lib,,g'` + patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK + done - # For some reason the libs retain RPATH to $out - for i in "$lib"/lib/{libtsan,libasan,libubsan}.so.*.*.*; do - PREV_RPATH=`patchelf --print-rpath "$i"` - NEW_RPATH=`echo "$PREV_RPATH" | sed "s,:${out}[^:]*,,g"` - patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK - done + # For some reason the libs retain RPATH to $out + for i in "$lib"/lib/{libtsan,libasan,libubsan}.so.*.*.*; do + PREV_RPATH=`patchelf --print-rpath "$i"` + NEW_RPATH=`echo "$PREV_RPATH" | sed "s,:${out}[^:]*,,g"` + patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK + done + fi # Get rid of some "fixed" header files rm -rfv $out/lib/gcc/*/*/include-fixed/{root,linux} diff --git a/pkgs/development/libraries/json-glib/default.nix b/pkgs/development/libraries/json-glib/default.nix index 5cfafc8e69a..99dcb377620 100644 --- a/pkgs/development/libraries/json-glib/default.nix +++ b/pkgs/development/libraries/json-glib/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, glib, pkgconfig, gobjectIntrospection, dbus }: +{ stdenv, fetchurl, glib, pkgconfig, gobjectIntrospection, dbus, libintlOrEmpty }: stdenv.mkDerivation rec { name = "json-glib-${minVer}.0"; @@ -13,6 +13,9 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ glib gobjectIntrospection ]; nativeBuildInputs = [ pkgconfig ]; + buildInputs = libintlOrEmpty; + + NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; meta = with stdenv.lib; { homepage = http://live.gnome.org/JsonGlib;