Merge pull request #34893 from taku0/swift_4.0.3

swift: 3.1.1 -> 4.0.3

authored by Joachim F and committed by GitHub dc2b7b9e e3f947a1

+251 -22
+60 -20
pkgs/development/compilers/swift/default.nix
··· 12 , swig 13 , bash 14 , libxml2 15 - , llvm 16 , clang 17 , python 18 , ncurses ··· 28 , git 29 , libgit2 30 , fetchFromGitHub 31 , paxctl 32 , findutils 33 #, systemtap 34 }: 35 36 let 37 - v_major = "3.1.1"; 38 version = "${v_major}-RELEASE"; 39 version_friendly = "${v_major}"; 40 ··· 47 name = "${repo}-${version}-src"; 48 }; 49 50 - sources = { 51 # FYI: SourceKit probably would work but currently requires building everything twice 52 # For more inforation, see: https://github.com/apple/swift/pull/3594#issuecomment-234169759 53 clang = fetch { 54 repo = "swift-clang"; 55 - sha256 = "1gmdgr8jph87nya8cgdl7iwrggbji2sag996m27hkbszw4nxy8sd"; 56 }; 57 llvm = fetch { 58 repo = "swift-llvm"; 59 - sha256 = "0nwd7cp6mbj7f6a2rx8123n7ygs8406hsx7hp7ybagww6v75bwzi"; 60 }; 61 compilerrt = fetch { 62 repo = "swift-compiler-rt"; 63 - sha256 = "1gjcr6g3ffs3nhf4a84iwg4flbd7rqcf9rvvclwyq96msa3mj950"; 64 }; 65 cmark = fetch { 66 repo = "swift-cmark"; 67 - sha256 = "0qf2f3zd8lndkfbxbz6vkznzz8rvq5gigijh7pgmfx9fi4zcssqx"; 68 }; 69 lldb = fetch { 70 repo = "swift-lldb"; 71 - sha256 = "17n4whpf3wxw9zaayiq21gk9q3547qxi4rvxld2hybh0k7a1bj5c"; 72 }; 73 llbuild = fetch { 74 repo = "swift-llbuild"; 75 - sha256 = "1l3hnb2s01jby91k1ipbc3bhszq14vyx5pzdhf2chld1yhpg420d"; 76 }; 77 pm = fetch { 78 repo = "swift-package-manager"; 79 - sha256 = "1ayy5vk3mjk354pg9bf68wvnaj3jymx23w0qnlw1jxz256ff8fwi"; 80 }; 81 xctest = fetch { 82 repo = "swift-corelibs-xctest"; 83 - sha256 = "0cj5y7wanllfldag08ci567x12aw793c79afckpbsiaxmwy4xhnm"; 84 }; 85 foundation = fetch { 86 repo = "swift-corelibs-foundation"; 87 - sha256 = "1d1ldk7ckqn4mhmdhsx2zrmsd6jfxzgdywn2pki7limk979hcwjc"; 88 }; 89 libdispatch = fetch { 90 repo = "swift-corelibs-libdispatch"; 91 - sha256 = "0ckjg41fjak06i532azhryckjq64fkxzsal4svf5v4s8n9mkq2sg"; 92 fetchSubmodules = true; 93 }; 94 swift = fetch { 95 repo = "swift"; 96 - sha256 = "0879jlv37lmxc1apzi53xn033y72548i86r7fzwr0g52124q5gry"; 97 }; 98 }; 99 ··· 119 ]; 120 121 builder = '' 122 $SWIFT_SOURCE_ROOT/swift/utils/build-script \ 123 --preset=buildbot_linux \ 124 installable_package=$INSTALLABLE_PACKAGE \ ··· 126 install_destdir=$SWIFT_INSTALL_DIR \ 127 extra_cmake_options="${stdenv.lib.concatStringsSep "," cmakeFlags}"''; 128 129 in 130 stdenv.mkDerivation rec { 131 name = "swift-${version_friendly}"; ··· 145 rsync 146 which 147 findutils 148 ] ++ stdenv.lib.optional stdenv.needsPax paxctl; 149 150 # TODO: Revisit what's propagated and how ··· 198 # Just patch all the things for now, we can focus this later 199 patchShebangs $SWIFT_SOURCE_ROOT 200 201 substituteInPlace swift/stdlib/public/Platform/CMakeLists.txt \ 202 --replace '/usr/include' "${stdenv.cc.libc.dev}/include" 203 substituteInPlace swift/utils/build-script-impl \ ··· 209 patch -p1 -d swift -i ${./patches/0002-build-presets-linux-allow-custom-install-prefix.patch} 210 patch -p1 -d swift -i ${./patches/0003-build-presets-linux-disable-tests.patch} 211 patch -p1 -d swift -i ${./patches/0004-build-presets-linux-plumb-extra-cmake-options.patch} 212 213 substituteInPlace clang/lib/Driver/ToolChains.cpp \ 214 --replace ' addPathIfExists(D, SysRoot + "/usr/lib", Paths);' \ ··· 217 218 # Workaround hardcoded dep on "libcurses" (vs "libncurses"): 219 sed -i 's,curses,ncurses,' llbuild/*/*/CMakeLists.txt 220 - substituteInPlace llbuild/tests/BuildSystem/Build/basic.llbuild \ 221 - --replace /usr/bin/env $(type -p env) 222 223 # This test fails on one of my machines, not sure why. 224 # Disabling for now. 225 rm llbuild/tests/Examples/buildsystem-capi.llbuild 226 - 227 - substituteInPlace swift-corelibs-foundation/lib/script.py \ 228 - --replace /bin/cp $(type -p cp) 229 230 PREFIX=''${out/#\/} 231 substituteInPlace swift-corelibs-xctest/build_script.py \ 232 --replace usr "$PREFIX" 233 substituteInPlace swiftpm/Utilities/bootstrap \ 234 --replace "usr" "$PREFIX" 235 ''; 236 237 doCheck = false; ··· 251 # TODO: Use wrappers to get these on the PATH for swift tools, instead 252 ln -s ${clang}/bin/* $out/bin/ 253 ln -s ${targetPackages.stdenv.cc.bintools}/bin/ar $out/bin/ar 254 ''; 255 256 # Hack to avoid TMPDIR in RPATHs. ··· 263 license = licenses.asl20; 264 # Swift doesn't support 32bit Linux, unknown on other platforms. 265 platforms = [ "x86_64-linux" ]; 266 - broken = true; 267 }; 268 } 269
··· 12 , swig 13 , bash 14 , libxml2 15 , clang 16 , python 17 , ncurses ··· 27 , git 28 , libgit2 29 , fetchFromGitHub 30 + , fetchpatch 31 , paxctl 32 , findutils 33 + , makeWrapper 34 + , gnumake 35 + , file 36 #, systemtap 37 }: 38 39 let 40 + v_major = "4.0.3"; 41 version = "${v_major}-RELEASE"; 42 version_friendly = "${v_major}"; 43 ··· 50 name = "${repo}-${version}-src"; 51 }; 52 53 + sources = { 54 # FYI: SourceKit probably would work but currently requires building everything twice 55 # For more inforation, see: https://github.com/apple/swift/pull/3594#issuecomment-234169759 56 clang = fetch { 57 repo = "swift-clang"; 58 + sha256 = "0zm624iwiprk3c3nzqf4p1fd9zqic4yi3jv51cw3249ax4x6vy10"; 59 }; 60 llvm = fetch { 61 repo = "swift-llvm"; 62 + sha256 = "11vw6461c0cdvwm1wna1a5709fjj14hzp6br6jg94p4f6jp3yv4d"; 63 }; 64 compilerrt = fetch { 65 repo = "swift-compiler-rt"; 66 + sha256 = "1hj4qaj4c9n2wzg2cvarbyl0n708zd1dlw4zkzq07fjxxqs36nfa"; 67 }; 68 cmark = fetch { 69 repo = "swift-cmark"; 70 + sha256 = "1nmxp0fj749sgar682c5nsj7zxxigqwg973baxj2r656a7ybh325"; 71 }; 72 lldb = fetch { 73 repo = "swift-lldb"; 74 + sha256 = "0yk5qg85008vcn63vn2jpn5ls9pdhda222p2w1cfkrj27k5k8vqr"; 75 }; 76 llbuild = fetch { 77 repo = "swift-llbuild"; 78 + sha256 = "0jffw6z1s6ck1i05brw59x6vsg7zrxbz5n2wz72fj29rh3nppc7a"; 79 }; 80 pm = fetch { 81 repo = "swift-package-manager"; 82 + sha256 = "0xj070b8fii7ijfsnyq4fxgv6569vdrg0yippi85h2p1l7s9aagh"; 83 }; 84 xctest = fetch { 85 repo = "swift-corelibs-xctest"; 86 + sha256 = "0l355wq8zfwrpv044xf4smjwbm0bmib360748n8cwls3vkr9l2yv"; 87 }; 88 foundation = fetch { 89 repo = "swift-corelibs-foundation"; 90 + sha256 = "0s7yc5gsbd96a4bs8c6q24dyfjm4xhcr2nzhl2ics8dmi60j15s4"; 91 }; 92 libdispatch = fetch { 93 repo = "swift-corelibs-libdispatch"; 94 + sha256 = "0x8zzq3shhvmhq4sbhaaa0ddiv3nw347pz6ayym6jyzq7j9n15ia"; 95 fetchSubmodules = true; 96 }; 97 swift = fetch { 98 repo = "swift"; 99 + sha256 = "0a1gq0k5701i418f0qi7kywv16q7vh4a4wp0f6fpyv4sjkq27msx"; 100 }; 101 }; 102 ··· 122 ]; 123 124 builder = '' 125 + # gcc-6.4.0/include/c++/6.4.0/cstdlib:75:15: fatal error: 'stdlib.h' file not found 126 + NIX_CFLAGS_COMPILE="$( echo ${clang.default_cxx_stdlib_compile} ) $NIX_CFLAGS_COMPILE" 127 + 128 $SWIFT_SOURCE_ROOT/swift/utils/build-script \ 129 --preset=buildbot_linux \ 130 installable_package=$INSTALLABLE_PACKAGE \ ··· 132 install_destdir=$SWIFT_INSTALL_DIR \ 133 extra_cmake_options="${stdenv.lib.concatStringsSep "," cmakeFlags}"''; 134 135 + # from llvm/4/llvm.nix 136 + sigaltstackPatch = fetchpatch { 137 + name = "sigaltstack.patch"; # for glibc-2.26 138 + url = https://github.com/llvm-mirror/compiler-rt/commit/8a5e425a68d.diff; 139 + sha256 = "0h4y5vl74qaa7dl54b1fcyqalvlpd8zban2d1jxfkxpzyi7m8ifi"; 140 + }; 141 + 142 + # https://bugs.swift.org/browse/SR-6409 143 + sigunusedPatch = fetchpatch { 144 + name = "sigunused.patch"; 145 + url = "https://github.com/apple/swift-llbuild/commit/303a89bc6da606c115560921a452686aa0655f5e.diff"; 146 + sha256 = "04sw7ym1grzggj1v3xrzr2ljxz8rf9rnn9n5fg1xjbwlrdagkc7m"; 147 + }; 148 + 149 in 150 stdenv.mkDerivation rec { 151 name = "swift-${version_friendly}"; ··· 165 rsync 166 which 167 findutils 168 + makeWrapper 169 + gnumake 170 ] ++ stdenv.lib.optional stdenv.needsPax paxctl; 171 172 # TODO: Revisit what's propagated and how ··· 220 # Just patch all the things for now, we can focus this later 221 patchShebangs $SWIFT_SOURCE_ROOT 222 223 + # TODO eliminate use of env. 224 + find -type f -print0 | xargs -0 sed -i \ 225 + -e 's|/usr/bin/env|${coreutils}/bin/env|g' \ 226 + -e 's|/usr/bin/make|${gnumake}/bin/make|g' \ 227 + -e 's|/bin/mkdir|${coreutils}/bin/mkdir|g' \ 228 + -e 's|/bin/cp|${coreutils}/bin/cp|g' \ 229 + -e 's|/usr/bin/file|${file}/bin/file|g' 230 + 231 substituteInPlace swift/stdlib/public/Platform/CMakeLists.txt \ 232 --replace '/usr/include' "${stdenv.cc.libc.dev}/include" 233 substituteInPlace swift/utils/build-script-impl \ ··· 239 patch -p1 -d swift -i ${./patches/0002-build-presets-linux-allow-custom-install-prefix.patch} 240 patch -p1 -d swift -i ${./patches/0003-build-presets-linux-disable-tests.patch} 241 patch -p1 -d swift -i ${./patches/0004-build-presets-linux-plumb-extra-cmake-options.patch} 242 + # https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27 243 + patch -p1 -i ${./patches/remove_xlocale.patch} 244 + # https://bugs.swift.org/browse/SR-4633 245 + patch -p1 -d swift -i ${./patches/icu59.patch} 246 + 247 + # https://bugs.swift.org/browse/SR-5779 248 + sed -i -e 's|"-latomic"|"-Wl,-rpath,${clang.cc.gcc.lib}/lib" "-L${clang.cc.gcc.lib}/lib" "-latomic"|' swift/cmake/modules/AddSwift.cmake 249 250 substituteInPlace clang/lib/Driver/ToolChains.cpp \ 251 --replace ' addPathIfExists(D, SysRoot + "/usr/lib", Paths);' \ ··· 254 255 # Workaround hardcoded dep on "libcurses" (vs "libncurses"): 256 sed -i 's,curses,ncurses,' llbuild/*/*/CMakeLists.txt 257 258 # This test fails on one of my machines, not sure why. 259 # Disabling for now. 260 rm llbuild/tests/Examples/buildsystem-capi.llbuild 261 262 PREFIX=''${out/#\/} 263 substituteInPlace swift-corelibs-xctest/build_script.py \ 264 --replace usr "$PREFIX" 265 substituteInPlace swiftpm/Utilities/bootstrap \ 266 --replace "usr" "$PREFIX" 267 + '' + stdenv.lib.optionalString (stdenv ? glibc) '' 268 + patch -p1 -d compiler-rt -i ${sigaltstackPatch} 269 + patch -p1 -d compiler-rt -i ${./patches/sigaltstack.patch} 270 + patch -p1 -d llbuild -i ${sigunusedPatch} 271 + patch -p1 -i ${./patches/sigunused.patch} 272 ''; 273 274 doCheck = false; ··· 288 # TODO: Use wrappers to get these on the PATH for swift tools, instead 289 ln -s ${clang}/bin/* $out/bin/ 290 ln -s ${targetPackages.stdenv.cc.bintools}/bin/ar $out/bin/ar 291 + 292 + wrapProgram $out/bin/swift \ 293 + --suffix C_INCLUDE_PATH : $out/lib/swift/clang/include \ 294 + --suffix CPLUS_INCLUDE_PATH : $out/lib/swift/clang/include 295 ''; 296 297 # Hack to avoid TMPDIR in RPATHs. ··· 304 license = licenses.asl20; 305 # Swift doesn't support 32bit Linux, unknown on other platforms. 306 platforms = [ "x86_64-linux" ]; 307 }; 308 } 309
+2 -2
pkgs/development/compilers/swift/patches/0002-build-presets-linux-allow-custom-install-prefix.patch
··· 11 index e6b0af3581..1095cbaab7 100644 12 --- a/utils/build-presets.ini 13 +++ b/utils/build-presets.ini 14 - @@ -692,7 +692,7 @@ install-lldb 15 install-llbuild 16 install-swiftpm 17 install-xctest 18 -install-prefix=/usr 19 +install-prefix=%(install_prefix)s 20 - swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;swift-remote-mirror;sdk-overlay;license 21 build-swift-static-stdlib 22 build-swift-static-sdk-overlay 23 --
··· 11 index e6b0af3581..1095cbaab7 100644 12 --- a/utils/build-presets.ini 13 +++ b/utils/build-presets.ini 14 + @@ -708,7 +708,7 @@ install-lldb 15 install-llbuild 16 install-swiftpm 17 install-xctest 18 -install-prefix=/usr 19 +install-prefix=%(install_prefix)s 20 + swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;swift-remote-mirror;sdk-overlay;license;sourcekit-inproc 21 build-swift-static-stdlib 22 build-swift-static-sdk-overlay 23 --
+113
pkgs/development/compilers/swift/patches/icu59.patch
···
··· 1 + --- a/stdlib/public/stubs/UnicodeNormalization.cpp 2 + +++ b/stdlib/public/stubs/UnicodeNormalization.cpp 3 + @@ -86,11 +86,8 @@ ASCIICollation() { 4 + for (unsigned char c = 0; c < 128; ++c) { 5 + UErrorCode ErrorCode = U_ZERO_ERROR; 6 + intptr_t NumCollationElts = 0; 7 + -#if defined(__CYGWIN__) || defined(_MSC_VER) 8 + UChar Buffer[1]; 9 + -#else 10 + - uint16_t Buffer[1]; 11 + -#endif 12 + + 13 + Buffer[0] = c; 14 + 15 + UCollationElements *CollationIterator = 16 + @@ -127,18 +124,9 @@ swift::_swift_stdlib_unicode_compare_utf16_utf16(const uint16_t *LeftString, 17 + int32_t LeftLength, 18 + const uint16_t *RightString, 19 + int32_t RightLength) { 20 + -#if defined(__CYGWIN__) || defined(_MSC_VER) 21 + - // ICU UChar type is platform dependent. In Cygwin, it is defined 22 + - // as wchar_t which size is 2. It seems that the underlying binary 23 + - // representation is same with swift utf16 representation. 24 + return ucol_strcoll(GetRootCollator(), 25 + reinterpret_cast<const UChar *>(LeftString), LeftLength, 26 + reinterpret_cast<const UChar *>(RightString), RightLength); 27 + -#else 28 + - return ucol_strcoll(GetRootCollator(), 29 + - LeftString, LeftLength, 30 + - RightString, RightLength); 31 + -#endif 32 + } 33 + 34 + /// Compares the strings via the Unicode Collation Algorithm on the root locale. 35 + @@ -156,12 +144,8 @@ swift::_swift_stdlib_unicode_compare_utf8_utf16(const unsigned char *LeftString, 36 + UErrorCode ErrorCode = U_ZERO_ERROR; 37 + 38 + uiter_setUTF8(&LeftIterator, reinterpret_cast<const char *>(LeftString), LeftLength); 39 + -#if defined(__CYGWIN__) || defined(_MSC_VER) 40 + uiter_setString(&RightIterator, reinterpret_cast<const UChar *>(RightString), 41 + RightLength); 42 + -#else 43 + - uiter_setString(&RightIterator, RightString, RightLength); 44 + -#endif 45 + 46 + uint32_t Diff = ucol_strcollIter(GetRootCollator(), 47 + &LeftIterator, &RightIterator, &ErrorCode); 48 + @@ -199,14 +183,10 @@ swift::_swift_stdlib_unicode_compare_utf8_utf8(const unsigned char *LeftString, 49 + void *swift::_swift_stdlib_unicodeCollationIterator_create( 50 + const __swift_uint16_t *Str, __swift_uint32_t Length) { 51 + UErrorCode ErrorCode = U_ZERO_ERROR; 52 + -#if defined(__CYGWIN__) || defined(_MSC_VER) 53 + UCollationElements *CollationIterator = ucol_openElements( 54 + GetRootCollator(), reinterpret_cast<const UChar *>(Str), Length, 55 + &ErrorCode); 56 + -#else 57 + - UCollationElements *CollationIterator = ucol_openElements( 58 + - GetRootCollator(), Str, Length, &ErrorCode); 59 + -#endif 60 + + 61 + if (U_FAILURE(ErrorCode)) { 62 + swift::crash("_swift_stdlib_unicodeCollationIterator_create: ucol_openElements() failed."); 63 + } 64 + @@ -244,17 +224,12 @@ swift::_swift_stdlib_unicode_strToUpper(uint16_t *Destination, 65 + const uint16_t *Source, 66 + int32_t SourceLength) { 67 + UErrorCode ErrorCode = U_ZERO_ERROR; 68 + -#if defined(__CYGWIN__) || defined(_MSC_VER) 69 + uint32_t OutputLength = u_strToUpper(reinterpret_cast<UChar *>(Destination), 70 + DestinationCapacity, 71 + reinterpret_cast<const UChar *>(Source), 72 + SourceLength, 73 + "", &ErrorCode); 74 + -#else 75 + - uint32_t OutputLength = u_strToUpper(Destination, DestinationCapacity, 76 + - Source, SourceLength, 77 + - "", &ErrorCode); 78 + -#endif 79 + + 80 + if (U_FAILURE(ErrorCode) && ErrorCode != U_BUFFER_OVERFLOW_ERROR) { 81 + swift::crash("u_strToUpper: Unexpected error uppercasing unicode string."); 82 + } 83 + @@ -271,17 +246,12 @@ swift::_swift_stdlib_unicode_strToLower(uint16_t *Destination, 84 + const uint16_t *Source, 85 + int32_t SourceLength) { 86 + UErrorCode ErrorCode = U_ZERO_ERROR; 87 + -#if defined(__CYGWIN__) || defined(_MSC_VER) 88 + uint32_t OutputLength = u_strToLower(reinterpret_cast<UChar *>(Destination), 89 + DestinationCapacity, 90 + reinterpret_cast<const UChar *>(Source), 91 + SourceLength, 92 + "", &ErrorCode); 93 + -#else 94 + - uint32_t OutputLength = u_strToLower(Destination, DestinationCapacity, 95 + - Source, SourceLength, 96 + - "", &ErrorCode); 97 + -#endif 98 + + 99 + if (U_FAILURE(ErrorCode) && ErrorCode != U_BUFFER_OVERFLOW_ERROR) { 100 + swift::crash("u_strToLower: Unexpected error lowercasing unicode string."); 101 + } 102 + @@ -300,9 +300,9 @@ 103 + 104 + swift::__swift_stdlib_UBreakIterator *swift::__swift_stdlib_ubrk_open( 105 + swift::__swift_stdlib_UBreakIteratorType type, const char *locale, 106 + - const UChar *text, int32_t textLength, __swift_stdlib_UErrorCode *status) { 107 + + const __swift_stdlib_UChar * text, __swift_int32_t textLength, __swift_stdlib_UErrorCode *status) { 108 + return ptr_cast<swift::__swift_stdlib_UBreakIterator>( 109 + - ubrk_open(static_cast<UBreakIteratorType>(type), locale, text, textLength, 110 + + ubrk_open(static_cast<UBreakIteratorType>(type), locale, reinterpret_cast<const UChar *>(text), textLength, 111 + ptr_cast<UErrorCode>(status))); 112 + } 113 +
+54
pkgs/development/compilers/swift/patches/remove_xlocale.patch
···
··· 1 + --- a/swift/stdlib/public/SDK/os/os_trace_blob.c 2 + +++ b/swift/stdlib/public/SDK/os/os_trace_blob.c 3 + @@ -14,7 +14,6 @@ 4 + #include <dispatch/dispatch.h> 5 + #include <os/base.h> 6 + #include <os/log.h> 7 + -#include <xlocale.h> 8 + #include "os_trace_blob.h" 9 + 10 + OS_NOINLINE 11 + 12 + --- a/swift/stdlib/public/stubs/Stubs.cpp 13 + +++ b/swift/stdlib/public/stubs/Stubs.cpp 14 + @@ -61,7 +61,6 @@ 15 + #define strtof_l swift_strtof_l 16 + #define strtold_l swift_strtold_l 17 + #else 18 + -#include <xlocale.h> 19 + #endif 20 + #include <limits> 21 + #include "llvm/ADT/StringExtras.h" 22 + 23 + --- a/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringDefaultEncoding.h 24 + +++ b/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringDefaultEncoding.h 25 + @@ -20,7 +20,6 @@ 26 + #include <unistd.h> 27 + #include <string.h> 28 + #include <stdio.h> 29 + -#include <xlocale.h> 30 + 31 + CF_EXTERN_C_BEGIN 32 + 33 + 34 + --- a/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringEncodings.c 35 + +++ b/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringEncodings.c 36 + @@ -24,7 +24,6 @@ 37 + #include <unistd.h> 38 + #include <string.h> 39 + #include <stdio.h> 40 + -#include <xlocale.h> 41 + #include <CoreFoundation/CFStringDefaultEncoding.h> 42 + #endif 43 + 44 + 45 + --- a/swift-corelibs-foundation/CoreFoundation/Base.subproj/CFInternal.h 46 + +++ b/swift-corelibs-foundation/CoreFoundation/Base.subproj/CFInternal.h 47 + @@ -95,7 +95,6 @@ 48 + #if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI || DEPLOYMENT_TARGET_LINUX || DEPLOYMENT_TARGET_FREEBSD 49 + #if TARGET_OS_CYGWIN 50 + #else 51 + -#include <xlocale.h> 52 + #endif 53 + #include <unistd.h> 54 + #include <sys/time.h>
+11
pkgs/development/compilers/swift/patches/sigaltstack.patch
···
··· 1 + --- a/lib/esan/esan_sideline_linux.cpp 2 + +++ b/lib/esan/esan_sideline_linux.cpp 3 + @@ -70,7 +70,7 @@ int SidelineThread::runSideline(void *Arg) { 4 + 5 + // Set up a signal handler on an alternate stack for safety. 6 + InternalScopedBuffer<char> StackMap(SigAltStackSize); 7 + - struct sigaltstack SigAltStack; 8 + + stack_t SigAltStack; 9 + SigAltStack.ss_sp = StackMap.data(); 10 + SigAltStack.ss_size = SigAltStackSize; 11 + SigAltStack.ss_flags = 0;
+11
pkgs/development/compilers/swift/patches/sigunused.patch
···
··· 1 + --- a/swiftpm/Sources/Basic/Process.swift 2 + +++ b/swiftpm/Sources/Basic/Process.swift 3 + @@ -258,7 +258,7 @@ public func launch() throws { 4 + // modify, so we have to take care about the set we use. 5 + var mostSignals = sigset_t() 6 + sigemptyset(&mostSignals) 7 + - for i in 1 ..< SIGUNUSED { 8 + + for i in 1 ..< SIGSYS { 9 + if i == SIGKILL || i == SIGSTOP { 10 + continue 11 + }