about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2014-01-20 19:39:28 +0100
committerVladimír Čunát <vcunat@gmail.com>2014-01-20 19:39:28 +0100
commitac6761c9081134baaa7dae18f06cbfaca38270d5 (patch)
treea1ff0e93e8907624d65aff367496513d3dc47374 /pkgs/build-support
parent177667eea987898097e854a54962ff90bbf4fa35 (diff)
parent8088837dc8f35ef7853787f88bb1db7248900cc4 (diff)
downloadnixlib-ac6761c9081134baaa7dae18f06cbfaca38270d5.tar
nixlib-ac6761c9081134baaa7dae18f06cbfaca38270d5.tar.gz
nixlib-ac6761c9081134baaa7dae18f06cbfaca38270d5.tar.bz2
nixlib-ac6761c9081134baaa7dae18f06cbfaca38270d5.tar.lz
nixlib-ac6761c9081134baaa7dae18f06cbfaca38270d5.tar.xz
nixlib-ac6761c9081134baaa7dae18f06cbfaca38270d5.tar.zst
nixlib-ac6761c9081134baaa7dae18f06cbfaca38270d5.zip
Merge master into stdenv-updates
Conflicts:
	pkgs/applications/version-management/gource/default.nix
	pkgs/top-level/all-packages.nix
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/clang-wrapper/builder.sh3
-rw-r--r--pkgs/build-support/clang-wrapper/clang-wrapper.sh10
-rw-r--r--pkgs/build-support/clang-wrapper/default.nix3
-rw-r--r--pkgs/build-support/clang-wrapper/ld-wrapper.sh3
-rw-r--r--pkgs/build-support/vm/default.nix26
5 files changed, 37 insertions, 8 deletions
diff --git a/pkgs/build-support/clang-wrapper/builder.sh b/pkgs/build-support/clang-wrapper/builder.sh
index 3f90b9d32bd0..0cdb2b96135e 100644
--- a/pkgs/build-support/clang-wrapper/builder.sh
+++ b/pkgs/build-support/clang-wrapper/builder.sh
@@ -59,13 +59,16 @@ doSubstitute() {
     local src=$1
     local dst=$2
     local uselibcxx=
+    local uselibcxxabi=
     if test -n "$libcxx" && echo $dst | fgrep ++; then uselibcxx=$libcxx; fi
+    if test -n "$libcxxabi" && echo $dst | fgrep ++; then uselibcxxabi=$libcxxabi; fi
     # Can't use substitute() here, because replace may not have been
     # built yet (in the bootstrap).
     sed \
         -e "s^@out@^$out^g" \
         -e "s^@shell@^$shell^g" \
         -e "s^@libcxx@^$uselibcxx^g" \
+        -e "s^@libcxxabi@^$uselibcxxabi^g" \
         -e "s^@clang@^$clang^g" \
         -e "s^@clangProg@^$clangProg^g" \
         -e "s^@binutils@^$binutils^g" \
diff --git a/pkgs/build-support/clang-wrapper/clang-wrapper.sh b/pkgs/build-support/clang-wrapper/clang-wrapper.sh
index 84067844cad8..b39aa2d721e8 100644
--- a/pkgs/build-support/clang-wrapper/clang-wrapper.sh
+++ b/pkgs/build-support/clang-wrapper/clang-wrapper.sh
@@ -76,11 +76,12 @@ if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE"; then
         n=$((n + 1))
     done
     params=("${rest[@]}")
+    NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE --sysroot=/var/empty"
 fi
 
 if test -n "@libcxx@"; then
     NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem@libcxx@/include/c++/v1 -stdlib=libc++"
-    NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK -L@libcxx@/lib -stdlib=libc++ -lc++abi"
+    NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK -L@libcxx@/lib -stdlib=libc++ -L@libcxxabi@/lib -lc++abi"
 fi
 
 # Add the flags for the C compiler proper.
@@ -137,13 +138,6 @@ if test -n "$NIX_CLANG_WRAPPER_EXEC_HOOK"; then
     source "$NIX_CLANG_WRAPPER_EXEC_HOOK"
 fi
 
-# We nuke LD_LIBRARY_PATH here, because clang dynamically links to LLVM.
-# Unfortunately, when such clang is used to build LLVM again, it can get in
-# trouble temporarily binding to the build-directory versions of the libraries
-# (the buildsystem sets LD_LIBRARY_PATH).  That is very undesirable and can
-# cause mysterious failures.
-LD_LIBRARY_PATH=
-
 # Call the real `clang'.  Filter out warnings from stderr about unused
 # `-B' flags, since they confuse some programs.  Deep bash magic to
 # apply grep to stderr (by swapping stdin/stderr twice).
diff --git a/pkgs/build-support/clang-wrapper/default.nix b/pkgs/build-support/clang-wrapper/default.nix
index 1b2a02fa86a4..05b8194697e1 100644
--- a/pkgs/build-support/clang-wrapper/default.nix
+++ b/pkgs/build-support/clang-wrapper/default.nix
@@ -34,6 +34,9 @@ stdenv.mkDerivation {
   addFlags = ./add-flags;
   
   inherit nativeTools nativeLibc nativePrefix clang clangVersion libcxx;
+
+  libcxxabi = libcxx.abi or null;
+
   gcc = clang.gcc;
   libc = if nativeLibc then null else libc;
   binutils = if nativeTools then null else binutils;
diff --git a/pkgs/build-support/clang-wrapper/ld-wrapper.sh b/pkgs/build-support/clang-wrapper/ld-wrapper.sh
index 48378778ba9e..ae45c62d460a 100644
--- a/pkgs/build-support/clang-wrapper/ld-wrapper.sh
+++ b/pkgs/build-support/clang-wrapper/ld-wrapper.sh
@@ -32,6 +32,9 @@ if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE" \
             # We cannot skip this; barf.
             echo "impure path \`$p' used in link" >&2
             exit 1
+        elif test "${p:0:9}" = "--sysroot"; then
+            # Our ld is not built with sysroot support (Can we fix that?)
+            :
         else
             rest=("${rest[@]}" "$p")
         fi
diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix
index df5f728174cc..625f93c874f2 100644
--- a/pkgs/build-support/vm/default.nix
+++ b/pkgs/build-support/vm/default.nix
@@ -976,6 +976,32 @@ rec {
       unifiedSystemDir = true;
     };
 
+    fedora20i386 = {
+      name = "fedora-20-i386";
+      fullName = "Fedora 20 (i386)";
+      packagesList = fetchurl {
+        url = mirror://fedora/linux/releases/20/Everything/i386/os/repodata/ae9c6ae73a12a64227e6b8e7b2d7e1c2a9515bd9c82f2af006c838e7a445dcb9-primary.xml.gz;
+        sha256 = "1ffw8njfff680vq2lby8v5dm3af2w7bv5rxqwqkl59hj7bknm75f";
+      };
+      urlPrefix = mirror://fedora/linux/releases/20/Everything/i386/os;
+      archs = ["noarch" "i386" "i586" "i686"];
+      packages = commonFedoraPackages ++ [ "cronie" "util-linux" ];
+      unifiedSystemDir = true;
+    };
+
+    fedora20x86_64 = {
+      name = "fedora-20-x86_64";
+      fullName = "Fedora 20 (x86_64)";
+      packagesList = fetchurl {
+        url = mirror://fedora/linux/releases/20/Everything/x86_64/os/repodata/d7777ea6ec66e1c86c3fe1900adf5bf8d877fb77dd06e439bd76bbbec4e82094-primary.xml.gz;
+        sha256 = "1510x32bxfvnplwy81nxfzxpgn7qbgghm4717xnciqb6xjk7wxyp";
+      };
+      urlPrefix = mirror://fedora/linux/releases/20/Everything/x86_64/os;
+      archs = ["noarch" "x86_64"];
+      packages = commonFedoraPackages ++ [ "cronie" "util-linux" ];
+      unifiedSystemDir = true;
+    };
+
     opensuse103i386 = {
       name = "opensuse-10.3-i586";
       fullName = "openSUSE 10.3 (i586)";