about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/swift/patches
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-05-17 10:56:54 +0000
committerAlyssa Ross <hi@alyssa.is>2019-05-17 10:56:54 +0000
commitc1d22074139ab0d048a05b5e5116265d099114d6 (patch)
tree97977009422d675f8930f97c309b010481289e72 /nixpkgs/pkgs/development/compilers/swift/patches
parent4dc8afe4fd6b18437150129e0a1ecc23c6a1c0b9 (diff)
parentbc9df0f66110039e495b6debe3a6cda4a1bb0fed (diff)
downloadnixlib-c1d22074139ab0d048a05b5e5116265d099114d6.tar
nixlib-c1d22074139ab0d048a05b5e5116265d099114d6.tar.gz
nixlib-c1d22074139ab0d048a05b5e5116265d099114d6.tar.bz2
nixlib-c1d22074139ab0d048a05b5e5116265d099114d6.tar.lz
nixlib-c1d22074139ab0d048a05b5e5116265d099114d6.tar.xz
nixlib-c1d22074139ab0d048a05b5e5116265d099114d6.tar.zst
nixlib-c1d22074139ab0d048a05b5e5116265d099114d6.zip
Merge commit 'bc9df0f66110039e495b6debe3a6cda4a1bb0fed'
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/swift/patches')
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/patches/0001-build-presets-linux-don-t-require-using-Ninja.patch4
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/patches/0002-build-presets-linux-allow-custom-install-prefix.patch14
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/patches/0003-build-presets-linux-don-t-build-extra-libs.patch23
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/patches/0004-build-presets-linux-plumb-extra-cmake-options.patch2
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/patches/glibc-arch-headers.patch8
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/patches/libdispatch-fortify-fix.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/patches/llvm-include-dirs.patch2
7 files changed, 51 insertions, 15 deletions
diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/0001-build-presets-linux-don-t-require-using-Ninja.patch b/nixpkgs/pkgs/development/compilers/swift/patches/0001-build-presets-linux-don-t-require-using-Ninja.patch
index f2b30e5dcdb6..79482ac10e69 100644
--- a/nixpkgs/pkgs/development/compilers/swift/patches/0001-build-presets-linux-don-t-require-using-Ninja.patch
+++ b/nixpkgs/pkgs/development/compilers/swift/patches/0001-build-presets-linux-don-t-require-using-Ninja.patch
@@ -11,8 +11,8 @@ diff --git a/utils/build-presets.ini b/utils/build-presets.ini
 index 7ee57ad2df..e6b0af3581 100644
 --- a/utils/build-presets.ini
 +++ b/utils/build-presets.ini
-@@ -717,7 +717,7 @@ swiftpm
- xctest
+@@ -721,7 +721,7 @@ swiftpm
+ 
  dash-dash
  
 -build-ninja
diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/0002-build-presets-linux-allow-custom-install-prefix.patch b/nixpkgs/pkgs/development/compilers/swift/patches/0002-build-presets-linux-allow-custom-install-prefix.patch
index 612b33cdb483..5c1927acb7f1 100644
--- a/nixpkgs/pkgs/development/compilers/swift/patches/0002-build-presets-linux-allow-custom-install-prefix.patch
+++ b/nixpkgs/pkgs/development/compilers/swift/patches/0002-build-presets-linux-allow-custom-install-prefix.patch
@@ -9,17 +9,17 @@ Subject: [PATCH 2/4] build-presets: (linux) allow custom install prefix
 
 diff --git a/utils/build-presets.ini b/utils/build-presets.ini
 index e6b0af3581..1095cbaab7 100644
---- a/utils/build-presets.ini
-+++ b/utils/build-presets.ini
-@@ -723,7 +723,7 @@ install-lldb
- install-llbuild
+--- a/utils/build-presets.ini	2019-04-11 14:51:40.060259462 +0200
++++ b/utils/build-presets.ini	2019-04-11 15:16:17.471137969 +0200
+@@ -728,7 +728,7 @@
  install-swiftpm
  install-xctest
+ install-libicu
 -install-prefix=/usr
 +install-prefix=%(install_prefix)s
- swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;swift-remote-mirror;sdk-overlay;license;sourcekit-inproc
- build-swift-static-stdlib
- build-swift-static-sdk-overlay
+ swift-install-components=autolink-driver;compiler;clang-resource-dir-symlink;stdlib;swift-remote-mirror;sdk-overlay;license;sourcekit-inproc
+ llvm-install-components=llvm-cov;llvm-profdata;IndexStore;clang;clang-headers;compiler-rt
+ install-libcxx
 -- 
 2.12.2
 
diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/0003-build-presets-linux-don-t-build-extra-libs.patch b/nixpkgs/pkgs/development/compilers/swift/patches/0003-build-presets-linux-don-t-build-extra-libs.patch
new file mode 100644
index 000000000000..5d766bc25901
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/patches/0003-build-presets-linux-don-t-build-extra-libs.patch
@@ -0,0 +1,23 @@
+--- a/utils/build-presets.ini	2019-04-11 15:19:57.845178834 +0200
++++ b/utils/build-presets.ini	2019-04-11 15:27:42.041297057 +0200
+@@ -716,8 +716,6 @@
+ llbuild
+ swiftpm
+ xctest
+-libicu
+-libcxx
+ 
+ dash-dash
+ 
+@@ -727,11 +725,9 @@
+ install-llbuild
+ install-swiftpm
+ install-xctest
+-install-libicu
+ install-prefix=%(install_prefix)s
+ swift-install-components=autolink-driver;compiler;clang-resource-dir-symlink;stdlib;swift-remote-mirror;sdk-overlay;license;sourcekit-inproc
+ llvm-install-components=llvm-cov;llvm-profdata;IndexStore;clang;clang-headers;compiler-rt
+-install-libcxx
+ build-swift-static-stdlib
+ build-swift-static-sdk-overlay
+ build-swift-stdlib-unittest-extra
diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/0004-build-presets-linux-plumb-extra-cmake-options.patch b/nixpkgs/pkgs/development/compilers/swift/patches/0004-build-presets-linux-plumb-extra-cmake-options.patch
index e84c7eb2a08a..1d0a6a9577aa 100644
--- a/nixpkgs/pkgs/development/compilers/swift/patches/0004-build-presets-linux-plumb-extra-cmake-options.patch
+++ b/nixpkgs/pkgs/development/compilers/swift/patches/0004-build-presets-linux-plumb-extra-cmake-options.patch
@@ -11,7 +11,7 @@ diff --git a/utils/build-presets.ini b/utils/build-presets.ini
 index 1739e91dc2..0608fed9c1 100644
 --- a/utils/build-presets.ini
 +++ b/utils/build-presets.ini
-@@ -740,6 +740,8 @@ install-destdir=%(install_destdir)s
+@@ -743,6 +743,8 @@ install-destdir=%(install_destdir)s
  # Path to the .tar.gz package we would create.
  installable-package=%(installable_package)s
  
diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/glibc-arch-headers.patch b/nixpkgs/pkgs/development/compilers/swift/patches/glibc-arch-headers.patch
index 650e1a2429d4..df906f9c84c7 100644
--- a/nixpkgs/pkgs/development/compilers/swift/patches/glibc-arch-headers.patch
+++ b/nixpkgs/pkgs/development/compilers/swift/patches/glibc-arch-headers.patch
@@ -1,13 +1,13 @@
 The Nix glibc headers do not use include/x86_64-linux-gnu subdirectories.
 
---- swift/stdlib/public/Platform/CMakeLists.txt	2018-09-30 17:51:51.581766303 +0200
-+++ swift/stdlib/public/Platform/CMakeLists.txt	2018-09-30 18:40:04.118956708 +0200
-@@ -65,7 +65,7 @@
+--- swift/stdlib/public/Platform/CMakeLists.txt	2019-04-09 20:14:44.493801403 +0200
++++ swift/stdlib/public/Platform/CMakeLists.txt	2019-04-09 20:14:44.577800593 +0200
+@@ -68,7 +68,7 @@
      endif()
  
      set(GLIBC_INCLUDE_PATH "${GLIBC_SYSROOT_RELATIVE_INCLUDE_PATH}")
 -    set(GLIBC_ARCH_INCLUDE_PATH "${GLIBC_SYSROOT_RELATIVE_ARCH_INCLUDE_PATH}")
 +    set(GLIBC_ARCH_INCLUDE_PATH "${GLIBC_SYSROOT_RELATIVE_INCLUDE_PATH}")
  
-     if(NOT "${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}" STREQUAL "/")
+     if(NOT "${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}" STREQUAL "/" AND NOT "${sdk}" STREQUAL "ANDROID")
        set(GLIBC_INCLUDE_PATH "${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}${GLIBC_INCLUDE_PATH}")
diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/libdispatch-fortify-fix.patch b/nixpkgs/pkgs/development/compilers/swift/patches/libdispatch-fortify-fix.patch
new file mode 100644
index 000000000000..d23a308d68f4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/patches/libdispatch-fortify-fix.patch
@@ -0,0 +1,13 @@
+Nix compiles with _FORTIFY_SOURCE enabled. Fix error due to -Werror and an unused return value warning.
+
+--- swift-corelibs-libdispatch/src/internal.h	2019-04-26 09:33:38.287289099 +0200
++++ swift-corelibs-libdispatch/src/internal.h	2019-04-26 15:31:10.485334128 +0200
+@@ -1053,7 +1053,7 @@
+ #else
+ #define _dispatch_client_assert_fail(fmt, ...)  do { \
+ 		char *_msg = NULL; \
+-		asprintf(&_msg, "%s" fmt, DISPATCH_ASSERTION_FAILED_MESSAGE, \
++		(void)asprintf(&_msg, "%s" fmt, DISPATCH_ASSERTION_FAILED_MESSAGE, \
+ 				##__VA_ARGS__); \
+ 		_dispatch_assert_crash(_msg); \
+ 		free(_msg); \
diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/llvm-include-dirs.patch b/nixpkgs/pkgs/development/compilers/swift/patches/llvm-include-dirs.patch
index 9523943c4801..789c0be7e7a8 100644
--- a/nixpkgs/pkgs/development/compilers/swift/patches/llvm-include-dirs.patch
+++ b/nixpkgs/pkgs/development/compilers/swift/patches/llvm-include-dirs.patch
@@ -2,7 +2,7 @@ Only use the Nix include dirs when no sysroot is configured.
 
 --- clang/lib/Driver/ToolChains/Linux.cpp	2018-10-05 18:01:15.731109551 +0200
 +++ clang/lib/Driver/ToolChains/Linux.cpp	2018-10-05 18:00:27.959509924 +0200
-@@ -565,7 +565,7 @@
+@@ -641,7 +641,7 @@
  
    // Check for configure-time C include directories.
    StringRef CIncludeDirs(C_INCLUDE_DIRS);