summary refs log tree commit diff
path: root/pkgs/development/compilers/swift/patches
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/swift/patches')
-rw-r--r--pkgs/development/compilers/swift/patches/0003-build-presets-linux-disable-tests.patch38
-rw-r--r--pkgs/development/compilers/swift/patches/icu59.patch113
-rw-r--r--pkgs/development/compilers/swift/patches/remove_xlocale.patch54
-rw-r--r--pkgs/development/compilers/swift/patches/sigaltstack.patch11
-rw-r--r--pkgs/development/compilers/swift/patches/sigunused.patch11
5 files changed, 0 insertions, 227 deletions
diff --git a/pkgs/development/compilers/swift/patches/0003-build-presets-linux-disable-tests.patch b/pkgs/development/compilers/swift/patches/0003-build-presets-linux-disable-tests.patch
deleted file mode 100644
index f647d9189dd2..000000000000
--- a/pkgs/development/compilers/swift/patches/0003-build-presets-linux-disable-tests.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From fcc7c216da6cd255f884b7aa39f361786e3afa6a Mon Sep 17 00:00:00 2001
-From: Will Dietz <w@wdtz.org>
-Date: Tue, 28 Mar 2017 15:02:18 -0500
-Subject: [PATCH 3/4] build-presets: (linux) disable tests.
-
----
- utils/build-presets.ini | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/utils/build-presets.ini b/utils/build-presets.ini
-index 1095cbaab7..1739e91dc2 100644
---- a/utils/build-presets.ini
-+++ b/utils/build-presets.ini
-@@ -700,7 +700,7 @@ build-swift-stdlib-unittest-extra
- 
- # Executes the lit tests for the installable package that is created
- # Assumes the swift-integration-tests repo is checked out
--test-installable-package
-+# test-installable-package
- 
- # Path to the root of the installation filesystem.
- install-destdir=%(install_destdir)s
-@@ -713,9 +713,9 @@ mixin-preset=mixin_linux_installation
- build-subdir=buildbot_linux
- lldb
- release
--test
--validation-test
--long-test
-+#test
-+#validation-test
-+#long-test
- foundation
- libdispatch
- lit-args=-v
--- 
-2.12.2
-
diff --git a/pkgs/development/compilers/swift/patches/icu59.patch b/pkgs/development/compilers/swift/patches/icu59.patch
deleted file mode 100644
index 26337814cafa..000000000000
--- a/pkgs/development/compilers/swift/patches/icu59.patch
+++ /dev/null
@@ -1,113 +0,0 @@
---- a/stdlib/public/stubs/UnicodeNormalization.cpp
-+++ b/stdlib/public/stubs/UnicodeNormalization.cpp
-@@ -86,11 +86,8 @@ ASCIICollation() {
-     for (unsigned char c = 0; c < 128; ++c) {
-       UErrorCode ErrorCode = U_ZERO_ERROR;
-       intptr_t NumCollationElts = 0;
--#if defined(__CYGWIN__) || defined(_MSC_VER)
-       UChar Buffer[1];
--#else
--      uint16_t Buffer[1];
--#endif
-+
-       Buffer[0] = c;
- 
-       UCollationElements *CollationIterator =
-@@ -127,18 +124,9 @@ swift::_swift_stdlib_unicode_compare_utf16_utf16(const uint16_t *LeftString,
-                                                  int32_t LeftLength,
-                                                  const uint16_t *RightString,
-                                                  int32_t RightLength) {
--#if defined(__CYGWIN__) || defined(_MSC_VER)
--  // ICU UChar type is platform dependent. In Cygwin, it is defined
--  // as wchar_t which size is 2. It seems that the underlying binary
--  // representation is same with swift utf16 representation.
-   return ucol_strcoll(GetRootCollator(),
-     reinterpret_cast<const UChar *>(LeftString), LeftLength,
-     reinterpret_cast<const UChar *>(RightString), RightLength);
--#else
--  return ucol_strcoll(GetRootCollator(),
--    LeftString, LeftLength,
--    RightString, RightLength);
--#endif
- }
- 
- /// Compares the strings via the Unicode Collation Algorithm on the root locale.
-@@ -156,12 +144,8 @@ swift::_swift_stdlib_unicode_compare_utf8_utf16(const unsigned char *LeftString,
-   UErrorCode ErrorCode = U_ZERO_ERROR;
- 
-   uiter_setUTF8(&LeftIterator, reinterpret_cast<const char *>(LeftString), LeftLength);
--#if defined(__CYGWIN__) || defined(_MSC_VER)
-   uiter_setString(&RightIterator, reinterpret_cast<const UChar *>(RightString),
-                   RightLength);
--#else
--  uiter_setString(&RightIterator, RightString, RightLength);
--#endif
- 
-   uint32_t Diff = ucol_strcollIter(GetRootCollator(),
-     &LeftIterator, &RightIterator, &ErrorCode);
-@@ -199,14 +183,10 @@ swift::_swift_stdlib_unicode_compare_utf8_utf8(const unsigned char *LeftString,
- void *swift::_swift_stdlib_unicodeCollationIterator_create(
-     const __swift_uint16_t *Str, __swift_uint32_t Length) {
-   UErrorCode ErrorCode = U_ZERO_ERROR;
--#if defined(__CYGWIN__) || defined(_MSC_VER)
-   UCollationElements *CollationIterator = ucol_openElements(
-     GetRootCollator(), reinterpret_cast<const UChar *>(Str), Length,
-     &ErrorCode);
--#else
--  UCollationElements *CollationIterator = ucol_openElements(
--    GetRootCollator(), Str, Length, &ErrorCode);
--#endif
-+
-   if (U_FAILURE(ErrorCode)) {
-     swift::crash("_swift_stdlib_unicodeCollationIterator_create: ucol_openElements() failed.");
-   }
-@@ -244,17 +224,12 @@ swift::_swift_stdlib_unicode_strToUpper(uint16_t *Destination,
-                                         const uint16_t *Source,
-                                         int32_t SourceLength) {
-   UErrorCode ErrorCode = U_ZERO_ERROR;
--#if defined(__CYGWIN__) || defined(_MSC_VER)
-   uint32_t OutputLength = u_strToUpper(reinterpret_cast<UChar *>(Destination),
-                                        DestinationCapacity,
-                                        reinterpret_cast<const UChar *>(Source),
-                                        SourceLength,
-                                        "", &ErrorCode);
--#else
--  uint32_t OutputLength = u_strToUpper(Destination, DestinationCapacity,
--                                       Source, SourceLength,
--                                       "", &ErrorCode);
--#endif
-+
-   if (U_FAILURE(ErrorCode) && ErrorCode != U_BUFFER_OVERFLOW_ERROR) {
-     swift::crash("u_strToUpper: Unexpected error uppercasing unicode string.");
-   }
-@@ -271,17 +246,12 @@ swift::_swift_stdlib_unicode_strToLower(uint16_t *Destination,
-                                         const uint16_t *Source,
-                                         int32_t SourceLength) {
-   UErrorCode ErrorCode = U_ZERO_ERROR;
--#if defined(__CYGWIN__) || defined(_MSC_VER)
-   uint32_t OutputLength = u_strToLower(reinterpret_cast<UChar *>(Destination),
-                                        DestinationCapacity,
-                                        reinterpret_cast<const UChar *>(Source),
-                                        SourceLength,
-                                        "", &ErrorCode);
--#else
--  uint32_t OutputLength = u_strToLower(Destination, DestinationCapacity,
--                                       Source, SourceLength,
--                                       "", &ErrorCode);
--#endif
-+
-   if (U_FAILURE(ErrorCode) && ErrorCode != U_BUFFER_OVERFLOW_ERROR) {
-     swift::crash("u_strToLower: Unexpected error lowercasing unicode string.");
-   }
-@@ -300,9 +300,9 @@
- 
- swift::__swift_stdlib_UBreakIterator *swift::__swift_stdlib_ubrk_open(
-     swift::__swift_stdlib_UBreakIteratorType type, const char *locale,
--    const UChar *text, int32_t textLength, __swift_stdlib_UErrorCode *status) {
-+    const __swift_stdlib_UChar * text, __swift_int32_t textLength, __swift_stdlib_UErrorCode *status) {
-   return ptr_cast<swift::__swift_stdlib_UBreakIterator>(
--      ubrk_open(static_cast<UBreakIteratorType>(type), locale, text, textLength,
-+      ubrk_open(static_cast<UBreakIteratorType>(type), locale, reinterpret_cast<const UChar *>(text), textLength,
-                 ptr_cast<UErrorCode>(status)));
- }
- 
diff --git a/pkgs/development/compilers/swift/patches/remove_xlocale.patch b/pkgs/development/compilers/swift/patches/remove_xlocale.patch
deleted file mode 100644
index 8ef7e3916962..000000000000
--- a/pkgs/development/compilers/swift/patches/remove_xlocale.patch
+++ /dev/null
@@ -1,54 +0,0 @@
---- a/swift/stdlib/public/SDK/os/os_trace_blob.c
-+++ b/swift/stdlib/public/SDK/os/os_trace_blob.c
-@@ -14,7 +14,6 @@
- #include <dispatch/dispatch.h>
- #include <os/base.h>
- #include <os/log.h>
--#include <xlocale.h>
- #include "os_trace_blob.h"
- 
- OS_NOINLINE
-
---- a/swift/stdlib/public/stubs/Stubs.cpp
-+++ b/swift/stdlib/public/stubs/Stubs.cpp
-@@ -61,7 +61,6 @@
- #define strtof_l swift_strtof_l
- #define strtold_l swift_strtold_l
- #else
--#include <xlocale.h>
- #endif
- #include <limits>
- #include "llvm/ADT/StringExtras.h"
-
---- a/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringDefaultEncoding.h
-+++ b/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringDefaultEncoding.h
-@@ -20,7 +20,6 @@
- #include <unistd.h>
- #include <string.h>
- #include <stdio.h>
--#include <xlocale.h>
- 
- CF_EXTERN_C_BEGIN
- 
-
---- a/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringEncodings.c
-+++ b/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringEncodings.c
-@@ -24,7 +24,6 @@
- #include <unistd.h>
- #include <string.h>
- #include <stdio.h>
--#include <xlocale.h>
- #include <CoreFoundation/CFStringDefaultEncoding.h>
- #endif
- 
-
---- a/swift-corelibs-foundation/CoreFoundation/Base.subproj/CFInternal.h
-+++ b/swift-corelibs-foundation/CoreFoundation/Base.subproj/CFInternal.h
-@@ -95,7 +95,6 @@
- #if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI || DEPLOYMENT_TARGET_LINUX || DEPLOYMENT_TARGET_FREEBSD
- #if TARGET_OS_CYGWIN
- #else
--#include <xlocale.h>
- #endif
- #include <unistd.h>
- #include <sys/time.h>
diff --git a/pkgs/development/compilers/swift/patches/sigaltstack.patch b/pkgs/development/compilers/swift/patches/sigaltstack.patch
deleted file mode 100644
index c529fa3777b3..000000000000
--- a/pkgs/development/compilers/swift/patches/sigaltstack.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/lib/esan/esan_sideline_linux.cpp
-+++ b/lib/esan/esan_sideline_linux.cpp
-@@ -70,7 +70,7 @@ int SidelineThread::runSideline(void *Arg) {
- 
-   // Set up a signal handler on an alternate stack for safety.
-   InternalScopedBuffer<char> StackMap(SigAltStackSize);
--  struct sigaltstack SigAltStack;
-+  stack_t SigAltStack;
-   SigAltStack.ss_sp = StackMap.data();
-   SigAltStack.ss_size = SigAltStackSize;
-   SigAltStack.ss_flags = 0;
diff --git a/pkgs/development/compilers/swift/patches/sigunused.patch b/pkgs/development/compilers/swift/patches/sigunused.patch
deleted file mode 100644
index 2701d1a3ae25..000000000000
--- a/pkgs/development/compilers/swift/patches/sigunused.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/swiftpm/Sources/Basic/Process.swift
-+++ b/swiftpm/Sources/Basic/Process.swift
-@@ -258,7 +258,7 @@ public func launch() throws {
-         // modify, so we have to take care about the set we use.
-         var mostSignals = sigset_t()
-         sigemptyset(&mostSignals)
--        for i in 1 ..< SIGUNUSED {
-+        for i in 1 ..< SIGSYS {
-             if i == SIGKILL || i == SIGSTOP {
-                 continue
-             }