about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/swift/patches/0005-clang-toolchain-dir.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/swift/patches/0005-clang-toolchain-dir.patch')
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/patches/0005-clang-toolchain-dir.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/0005-clang-toolchain-dir.patch b/nixpkgs/pkgs/development/compilers/swift/patches/0005-clang-toolchain-dir.patch
new file mode 100644
index 000000000000..40d7728cf788
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/patches/0005-clang-toolchain-dir.patch
@@ -0,0 +1,13 @@
+Use the Nix include dirs and gcc runtime dir, when no sysroot is configured.
+
+--- a/lib/Driver/ToolChains/Linux.cpp
++++ b/lib/Driver/ToolChains/Linux.cpp
+@@ -574,7 +574,7 @@
+
+   // Check for configure-time C include directories.
+   StringRef CIncludeDirs(C_INCLUDE_DIRS);
+-  if (CIncludeDirs != "") {
++  if (CIncludeDirs != "" && (SysRoot.empty() || SysRoot == "/")) {
+     SmallVector<StringRef, 5> dirs;
+     CIncludeDirs.split(dirs, ":");
+     for (StringRef dir : dirs) {