From 94fe7bed1dc5f5a2084b9c8ccdc0bc1ecd102317 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 2 Jul 2012 17:04:56 +0200 Subject: [PATCH] Extend compiler wrapper scripts to allow compilation of "/dev/null" input. This feature sounds crazy, but it is used in some configure scripts (e.g. xbmc). This patch causes an almost complete rebuild of Nixpkgs. Patch submitted by Jan Malakhovski . --- pkgs/build-support/clang-wrapper/utils.sh | 1 + pkgs/build-support/gcc-cross-wrapper/utils.sh | 1 + pkgs/build-support/gcc-upc-wrapper/utils.sh | 1 + pkgs/build-support/gcc-wrapper/utils.sh | 1 + 4 files changed, 4 insertions(+) diff --git a/pkgs/build-support/clang-wrapper/utils.sh b/pkgs/build-support/clang-wrapper/utils.sh index 9a664e1d1e6b..753b3772e956 100644 --- a/pkgs/build-support/clang-wrapper/utils.sh +++ b/pkgs/build-support/clang-wrapper/utils.sh @@ -17,6 +17,7 @@ badPath() { # Otherwise, the path should refer to the store or some temporary # directory (including the build directory). test \ + "$p" != "/dev/null" -a \ "${p:0:${#NIX_STORE}}" != "$NIX_STORE" -a \ "${p:0:4}" != "/tmp" -a \ "${p:0:${#NIX_BUILD_TOP}}" != "$NIX_BUILD_TOP" diff --git a/pkgs/build-support/gcc-cross-wrapper/utils.sh b/pkgs/build-support/gcc-cross-wrapper/utils.sh index 9a664e1d1e6b..753b3772e956 100644 --- a/pkgs/build-support/gcc-cross-wrapper/utils.sh +++ b/pkgs/build-support/gcc-cross-wrapper/utils.sh @@ -17,6 +17,7 @@ badPath() { # Otherwise, the path should refer to the store or some temporary # directory (including the build directory). test \ + "$p" != "/dev/null" -a \ "${p:0:${#NIX_STORE}}" != "$NIX_STORE" -a \ "${p:0:4}" != "/tmp" -a \ "${p:0:${#NIX_BUILD_TOP}}" != "$NIX_BUILD_TOP" diff --git a/pkgs/build-support/gcc-upc-wrapper/utils.sh b/pkgs/build-support/gcc-upc-wrapper/utils.sh index 9a664e1d1e6b..753b3772e956 100644 --- a/pkgs/build-support/gcc-upc-wrapper/utils.sh +++ b/pkgs/build-support/gcc-upc-wrapper/utils.sh @@ -17,6 +17,7 @@ badPath() { # Otherwise, the path should refer to the store or some temporary # directory (including the build directory). test \ + "$p" != "/dev/null" -a \ "${p:0:${#NIX_STORE}}" != "$NIX_STORE" -a \ "${p:0:4}" != "/tmp" -a \ "${p:0:${#NIX_BUILD_TOP}}" != "$NIX_BUILD_TOP" diff --git a/pkgs/build-support/gcc-wrapper/utils.sh b/pkgs/build-support/gcc-wrapper/utils.sh index 9a664e1d1e6b..753b3772e956 100644 --- a/pkgs/build-support/gcc-wrapper/utils.sh +++ b/pkgs/build-support/gcc-wrapper/utils.sh @@ -17,6 +17,7 @@ badPath() { # Otherwise, the path should refer to the store or some temporary # directory (including the build directory). test \ + "$p" != "/dev/null" -a \ "${p:0:${#NIX_STORE}}" != "$NIX_STORE" -a \ "${p:0:4}" != "/tmp" -a \ "${p:0:${#NIX_BUILD_TOP}}" != "$NIX_BUILD_TOP"