diff options
author | Michael Hansen | 2017-12-12 17:09:52 -0800 |
---|---|---|
committer | Michael Hansen | 2017-12-12 17:09:52 -0800 |
commit | 47873fb4b388bb5d7a73d13c799ee148684da1c8 (patch) | |
tree | 380d7e486c21f5c483e728163e34663f593b8756 | |
parent | 6651324610c2078737e2d12c1cde18b41c17c743 (diff) | |
download | aur-47873fb4b388bb5d7a73d13c799ee148684da1c8.tar.gz |
Update to 4.0.3, minus sourcekit and one failing test
-rw-r--r-- | .SRCINFO | 66 | ||||
-rw-r--r-- | PKGBUILD | 74 | ||||
-rw-r--r-- | clang5.patch | 45 | ||||
-rw-r--r-- | glibc-2.26-compiler-rt-compat.patch | 118 | ||||
-rw-r--r-- | glibc-2.26.patch | 16 | ||||
-rw-r--r-- | icu59.patch | 31 | ||||
-rw-r--r-- | sphinx1.6.patch | 59 |
7 files changed, 212 insertions, 197 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Tue Sep 19 18:20:42 UTC 2017 +# Wed Dec 13 01:05:55 UTC 2017 pkgbase = swift-language pkgdesc = The Swift programming language and debugger - pkgver = 3.1.1 - pkgrel = 5 + pkgver = 4.0.3 + pkgrel = 1 url = http://swift.org/ arch = i686 arch = x86_64 @@ -12,7 +12,7 @@ pkgbase = swift-language makedepends = cmake makedepends = ninja makedepends = swig - makedepends = clang>=3.8 + makedepends = clang>=5.0 makedepends = python2-six makedepends = perl makedepends = python2-sphinx @@ -27,40 +27,38 @@ pkgbase = swift-language depends = sqlite depends = ncurses depends = libblocksruntime - source = swift-3.1.1-RELEASE.tar.gz::https://github.com/apple/swift/archive/swift-3.1.1-RELEASE.tar.gz - source = swift-llvm-3.1.1-RELEASE.tar.gz::https://github.com/apple/swift-llvm/archive/swift-3.1.1-RELEASE.tar.gz - source = swift-clang-3.1.1-RELEASE.tar.gz::https://github.com/apple/swift-clang/archive/swift-3.1.1-RELEASE.tar.gz - source = swift-lldb-3.1.1-RELEASE.tar.gz::https://github.com/apple/swift-lldb/archive/swift-3.1.1-RELEASE.tar.gz - source = swift-cmark-3.1.1-RELEASE.tar.gz::https://github.com/apple/swift-cmark/archive/swift-3.1.1-RELEASE.tar.gz - source = swift-llbuild-3.1.1-RELEASE.tar.gz::https://github.com/apple/swift-llbuild/archive/swift-3.1.1-RELEASE.tar.gz - source = swift-package-manager-3.1.1-RELEASE.tar.gz::https://github.com/apple/swift-package-manager/archive/swift-3.1.1-RELEASE.tar.gz - source = swift-corelibs-xctest-3.1.1-RELEASE.tar.gz::https://github.com/apple/swift-corelibs-xctest/archive/swift-3.1.1-RELEASE.tar.gz - source = swift-corelibs-foundation-3.1.1-RELEASE.tar.gz::https://github.com/apple/swift-corelibs-foundation/archive/swift-3.1.1-RELEASE.tar.gz - source = swift-corelibs-libdispatch-3.1.1-RELEASE.tar.gz::https://github.com/apple/swift-corelibs-libdispatch/archive/swift-3.1.1-RELEASE.tar.gz - source = swift-integration-tests-3.1.1-RELEASE.tar.gz::https://github.com/apple/swift-integration-tests/archive/swift-3.1.1-RELEASE.tar.gz - source = sourcekit_link_order.patch + source = swift-4.0.3-RELEASE.tar.gz::https://github.com/apple/swift/archive/swift-4.0.3-RELEASE.tar.gz + source = swift-llvm-4.0.3-RELEASE.tar.gz::https://github.com/apple/swift-llvm/archive/swift-4.0.3-RELEASE.tar.gz + source = swift-clang-4.0.3-RELEASE.tar.gz::https://github.com/apple/swift-clang/archive/swift-4.0.3-RELEASE.tar.gz + source = swift-lldb-4.0.3-RELEASE.tar.gz::https://github.com/apple/swift-lldb/archive/swift-4.0.3-RELEASE.tar.gz + source = swift-cmark-4.0.3-RELEASE.tar.gz::https://github.com/apple/swift-cmark/archive/swift-4.0.3-RELEASE.tar.gz + source = swift-llbuild-4.0.3-RELEASE.tar.gz::https://github.com/apple/swift-llbuild/archive/swift-4.0.3-RELEASE.tar.gz + source = swift-package-manager-4.0.3-RELEASE.tar.gz::https://github.com/apple/swift-package-manager/archive/swift-4.0.3-RELEASE.tar.gz + source = swift-corelibs-xctest-4.0.3-RELEASE.tar.gz::https://github.com/apple/swift-corelibs-xctest/archive/swift-4.0.3-RELEASE.tar.gz + source = swift-corelibs-foundation-4.0.3-RELEASE.tar.gz::https://github.com/apple/swift-corelibs-foundation/archive/swift-4.0.3-RELEASE.tar.gz + source = swift-corelibs-libdispatch-4.0.3-RELEASE.tar.gz::https://github.com/apple/swift-corelibs-libdispatch/archive/swift-4.0.3-RELEASE.tar.gz + source = swift-compiler-rt-4.0.3-RELEASE.tar.gz::https://github.com/apple/swift-compiler-rt/archive/swift-4.0.3-RELEASE.tar.gz + source = swift-integration-tests-4.0.3-RELEASE.tar.gz::https://github.com/apple/swift-integration-tests/archive/swift-4.0.3-RELEASE.tar.gz source = icu59.patch - source = sphinx1.6.patch source = lldb_missing_include.patch source = glibc-2.26.patch - source = clang5.patch - sha256sums = fe4dcb9ee1247acd6653fe193684e9cb212c6551e0b0b44849899bec99df3297 - sha256sums = 385b587b825adae9a9f7e5789e151ae0554e6e62f2f2f81ff3b623ef578b39bc - sha256sums = bf9ec0c157501eea69ea1eb3c4b8bf56058110ec6c6a870d81d53868b67d1b96 - sha256sums = 498fd3cc048759dbdf3319a66bcca05de19d037ab8e5129be68897b77ade449d - sha256sums = 51db8067f11976a7ca38a6ff9f173d3d9e3df290991be87835cdc003e0b62e4e - sha256sums = a5b0a69e3785ce483053a7c1d2b2fe3c6ccc81832a930afee7969a9147316165 - sha256sums = 8ba05b5399b266615cf0d2055698dd3f23b57111120e98419f56139301981914 - sha256sums = 188272552bf35c411c73ad35345e0e8893e67d8d098a805fb26ad220291421e3 - sha256sums = 36769d2db180ec1de8c8a4a84c9928badcfc5f0a94b1ae35e7287d4e10ee93b4 - sha256sums = b711a5afaf027ac2cfefc144cd3760dd1d6a99689864be6ecb73a62cbb21b04f - sha256sums = fff8f596a7104ba5fc202dc5a80683032a33a298cf9ede7fdd12f7faf629a45c - sha256sums = c9aa6e167a57ed31002471204d39bf24bb4ebecc38322571515ac73f02b237b6 - sha256sums = 3fedb626b375f6ad8b4601abd336f4560718a9c9134716f0c3a4e823b8c12857 - sha256sums = 3c06dcc15bef6cbda7ce7b8a6a4f89bd16599ddbd1b964add9f2048cdda4700b + source = glibc-2.26-compiler-rt-compat.patch + sha256sums = 026d596dd4a24580a5e442409e8c58259197bd73ddbb77e5aade96da982ea39b + sha256sums = a611487a82636142bc1ea8ef5b21401a5c75e57fb0dbf041ef8f2e85a472db2e + sha256sums = c940bd48c88f71622fb00167d92a619dd1614093893e1a09982c08da42259404 + sha256sums = 7f695a33ee5cb75be18ba962045e1b57405abf17bd354c3e2a15c29b4b296bcb + sha256sums = e95d0b54a0e897e768c9437dd67d56ec887909d0294cf6536ba240accd0d294f + sha256sums = 92001e449b54a47516086a4e7d5f575bffa2847ae1f658540b2ec6f6dee6c6e7 + sha256sums = 4c26d333a01c239de8aa96b0536b7ff7218b7a322851a7d3b3b91b59fb4ce244 + sha256sums = 868c4e23842218c895d333e7d6dbaa1c583b5a1ac2a32b26fff42f4a5c577357 + sha256sums = c20877e7fc658ef872d6acc9d1cad0d93a683bfeaef28e2bf665166540e539e5 + sha256sums = 0a6d503f7ec4ce367a4aa63f68478ce7c998ec36a60b0b01445e048ab69600a8 + sha256sums = 1c2da685e8f424cb4460ed1daaf0c308f8deff63e7a3716c8a881cef60fbc7d8 + sha256sums = 7c720b23d542d34296ee4cf5290e05c7c7c55b7e8187dfaa5b185ea021c4ab9d + sha256sums = 18b7895fba15702419e86ae593531669c3966d1c8aa9a83361c5c8ef9d54f893 sha256sums = be61c69ae7bb626f7f07f95cb5c0074013725c1b90a3ca68aa0c0f989d75e41e - sha256sums = f3eca044354ee371072aaf81452468cce1ff2abf9efc746db964dfdb400f88ab - sha256sums = 78da7fe1f8bffc729168c8224707cc14ee460c7adcba9a48fd77e2b22614fca3 + sha256sums = 215473272ec550c58fd2852c3e1c4aa4482a7d2b4980308df14f4a18676775a9 + sha256sums = 2311adf234f52831af3b326d0d589fceae0a5336aa8576fdfd62afe71c195124 pkgname = swift pkgdesc = The Swift programming language compiler and tools @@ -2,16 +2,16 @@ pkgbase=swift-language pkgname=(swift swift-lldb) -_swiftver=3.1.1-RELEASE +_swiftver=4.0.3-RELEASE pkgver=${_swiftver//-RELEASE/} -pkgrel=5 +pkgrel=1 pkgdesc="The Swift programming language and debugger" arch=('i686' 'x86_64') url="http://swift.org/" license=('apache') depends=('python2' 'libutil-linux' 'icu' 'libbsd' 'libedit' 'libxml2' 'sqlite' 'ncurses' 'libblocksruntime') -makedepends=('git' 'cmake' 'ninja' 'swig' 'clang>=3.8' 'python2-six' 'perl' +makedepends=('git' 'cmake' 'ninja' 'swig' 'clang>=5.0' 'python2-six' 'perl' 'python2-sphinx' 'python2-requests' 'rsync') source=( @@ -25,36 +25,34 @@ source=( "swift-corelibs-xctest-${_swiftver}.tar.gz::https://github.com/apple/swift-corelibs-xctest/archive/swift-${_swiftver}.tar.gz" "swift-corelibs-foundation-${_swiftver}.tar.gz::https://github.com/apple/swift-corelibs-foundation/archive/swift-${_swiftver}.tar.gz" "swift-corelibs-libdispatch-${_swiftver}.tar.gz::https://github.com/apple/swift-corelibs-libdispatch/archive/swift-${_swiftver}.tar.gz" + "swift-compiler-rt-${_swiftver}.tar.gz::https://github.com/apple/swift-compiler-rt/archive/swift-${_swiftver}.tar.gz" "swift-integration-tests-${_swiftver}.tar.gz::https://github.com/apple/swift-integration-tests/archive/swift-${_swiftver}.tar.gz" - "sourcekit_link_order.patch" "icu59.patch" - "sphinx1.6.patch" "lldb_missing_include.patch" "glibc-2.26.patch" - "clang5.patch" + "glibc-2.26-compiler-rt-compat.patch" ) -sha256sums=('fe4dcb9ee1247acd6653fe193684e9cb212c6551e0b0b44849899bec99df3297' - '385b587b825adae9a9f7e5789e151ae0554e6e62f2f2f81ff3b623ef578b39bc' - 'bf9ec0c157501eea69ea1eb3c4b8bf56058110ec6c6a870d81d53868b67d1b96' - '498fd3cc048759dbdf3319a66bcca05de19d037ab8e5129be68897b77ade449d' - '51db8067f11976a7ca38a6ff9f173d3d9e3df290991be87835cdc003e0b62e4e' - 'a5b0a69e3785ce483053a7c1d2b2fe3c6ccc81832a930afee7969a9147316165' - '8ba05b5399b266615cf0d2055698dd3f23b57111120e98419f56139301981914' - '188272552bf35c411c73ad35345e0e8893e67d8d098a805fb26ad220291421e3' - '36769d2db180ec1de8c8a4a84c9928badcfc5f0a94b1ae35e7287d4e10ee93b4' - 'b711a5afaf027ac2cfefc144cd3760dd1d6a99689864be6ecb73a62cbb21b04f' - 'fff8f596a7104ba5fc202dc5a80683032a33a298cf9ede7fdd12f7faf629a45c' - 'c9aa6e167a57ed31002471204d39bf24bb4ebecc38322571515ac73f02b237b6' - '3fedb626b375f6ad8b4601abd336f4560718a9c9134716f0c3a4e823b8c12857' - '3c06dcc15bef6cbda7ce7b8a6a4f89bd16599ddbd1b964add9f2048cdda4700b' +sha256sums=('026d596dd4a24580a5e442409e8c58259197bd73ddbb77e5aade96da982ea39b' + 'a611487a82636142bc1ea8ef5b21401a5c75e57fb0dbf041ef8f2e85a472db2e' + 'c940bd48c88f71622fb00167d92a619dd1614093893e1a09982c08da42259404' + '7f695a33ee5cb75be18ba962045e1b57405abf17bd354c3e2a15c29b4b296bcb' + 'e95d0b54a0e897e768c9437dd67d56ec887909d0294cf6536ba240accd0d294f' + '92001e449b54a47516086a4e7d5f575bffa2847ae1f658540b2ec6f6dee6c6e7' + '4c26d333a01c239de8aa96b0536b7ff7218b7a322851a7d3b3b91b59fb4ce244' + '868c4e23842218c895d333e7d6dbaa1c583b5a1ac2a32b26fff42f4a5c577357' + 'c20877e7fc658ef872d6acc9d1cad0d93a683bfeaef28e2bf665166540e539e5' + '0a6d503f7ec4ce367a4aa63f68478ce7c998ec36a60b0b01445e048ab69600a8' + '1c2da685e8f424cb4460ed1daaf0c308f8deff63e7a3716c8a881cef60fbc7d8' + '7c720b23d542d34296ee4cf5290e05c7c7c55b7e8187dfaa5b185ea021c4ab9d' + '18b7895fba15702419e86ae593531669c3966d1c8aa9a83361c5c8ef9d54f893' 'be61c69ae7bb626f7f07f95cb5c0074013725c1b90a3ca68aa0c0f989d75e41e' - 'f3eca044354ee371072aaf81452468cce1ff2abf9efc746db964dfdb400f88ab' - '78da7fe1f8bffc729168c8224707cc14ee460c7adcba9a48fd77e2b22614fca3') + '215473272ec550c58fd2852c3e1c4aa4482a7d2b4980308df14f4a18676775a9' + '2311adf234f52831af3b326d0d589fceae0a5336aa8576fdfd62afe71c195124') prepare() { # Use python2 where appropriate find "$srcdir" -type f -print0 | \ - xargs -0 sed -i 's|/usr/bin/env python$|&2|' + xargs -0 sed -i 's|/usr/bin/env python$|&2|;s|/usr/bin/python$|&2|' find "$srcdir/swift-lldb-swift-${_swiftver}" -name Makefile -print0 | \ xargs -0 sed -i 's|python-config|python2-config|g' sed -i '/^cmake_minimum_required/a set(Python_ADDITIONAL_VERSIONS 2.7)' \ @@ -66,7 +64,7 @@ prepare() { "$srcdir/swift-swift-${_swiftver}/test/sil-passpipeline-dump/basic.test-sh" # Use directory names which build-script expects - for sdir in llvm clang lldb cmark llbuild; do + for sdir in llvm clang lldb cmark llbuild compiler-rt; do ln -sf swift-${sdir}-swift-${_swiftver} ${sdir} done for sdir in corelibs-xctest corelibs-foundation corelibs-libdispatch \ @@ -77,23 +75,18 @@ prepare() { ln -sf swift-swift-${_swiftver} swift ln -sf swift-package-manager-swift-${_swiftver} swiftpm - # Fix library link order for sourcekitd-test - ( cd "${srcdir}/swift" && patch -p1 -i "${srcdir}/sourcekit_link_order.patch" ) - # ICU 59 changed the type of UChar to char16_t ( cd "${srcdir}/swift" && patch -p1 -i "${srcdir}/icu59.patch" ) - # Fix documentation build against Sphinx 1.6 - ( cd "${srcdir}/swift" && patch -p1 -i "${srcdir}/sphinx1.6.patch" ) - # LLDB is missing an include for std::bind with libstdc++/gcc7 ( cd "${srcdir}/lldb" && patch -p1 -i "${srcdir}/lldb_missing_include.patch" ) - # glibc 2.26 removed the non-standard xlocale.h and SIGUNUSED + # glibc 2.26 compatibility fixes ( cd "${srcdir}" && patch -p1 -i "${srcdir}/glibc-2.26.patch" ) + ( cd "${srcdir}/compiler-rt" && patch -p1 -i "${srcdir}/glibc-2.26-compiler-rt-compat.patch" ) - # Clang 5.0 fixed an obscure issue with standards-compliance - ( cd "${srcdir}/swift" && patch -p1 -i "${srcdir}/clang5.patch" ) + # Skip failing test for now (see https://bugs.swift.org/browse/SR-6176) + rm "${srcdir}/swift/test/Constraints/tuple_arguments.swift" } _common_build_params=( @@ -119,14 +112,11 @@ build() { cd "$srcdir/swift" export PATH="$PATH:/usr/bin/core_perl" - _build_script_wrapper -R "${_common_build_params[@]}" - - # Run the build a second time, this time with SourceKit enabled - # This is required because SourceKit depends on libdispatch, which - # in turn depends on swift, where SourceKit is located + # sourcekitd-test and sourcekitd-repl currently don't link + # correctly on Linux. Disable for now :( _build_script_wrapper -R "${_common_build_params[@]}" \ - --extra-cmake-options="-DSWIFT_BUILD_SOURCEKIT=TRUE" \ - --reconfigure + --extra-cmake-options="-DSWIFT_BUILD_SOURCEKIT=FALSE" \ + --skip-test-sourcekit } check() { @@ -138,7 +128,7 @@ check() { sed -i "/import_module('_lldb')/s/_lldb/lldb.&/" \ "${srcdir}/build/Ninja-ReleaseAssert/lldb-linux-${CARCH}/lib/python2.7/site-packages/lldb/__init__.py" - _build_script_wrapper -R -t + _build_script_wrapper -R -t --skip-test-sourcekit } package_swift() { @@ -163,7 +153,7 @@ package_swift() { ln -s swift "$pkgdir/usr/bin/swiftc" ln -s swift "$pkgdir/usr/bin/swift-autolink-extract" - install -m644 lib/libsourcekitdInProc.so "$pkgdir/usr/lib" + #install -m644 lib/libsourcekitdInProc.so "$pkgdir/usr/lib" install -dm755 "$pkgdir/usr/share/man/man1" install -m644 docs/tools/swift.1 "$pkgdir/usr/share/man/man1" diff --git a/clang5.patch b/clang5.patch deleted file mode 100644 index d413d3d1557e..000000000000 --- a/clang5.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -rupN a/lib/SIL/Projection.cpp b/lib/SIL/Projection.cpp ---- a/lib/SIL/Projection.cpp 2017-09-19 09:15:54.852473005 -0700 -+++ b/lib/SIL/Projection.cpp 2017-09-19 10:07:31.576737412 -0700 -@@ -905,7 +905,7 @@ processUsersOfValue(ProjectionTree &Tree - DEBUG(llvm::dbgs() << " " << *User); - - // First try to create a Projection for User. -- auto P = Projection::Projection(User); -+ auto P = typename Projection::Projection(User); - - // If we fail to create a projection, add User as a user to this node and - // continue. -diff -rupN a/lib/SILOptimizer/Transforms/SpeculativeDevirtualizer.cpp b/lib/SILOptimizer/Transforms/SpeculativeDevirtualizer.cpp ---- a/lib/SILOptimizer/Transforms/SpeculativeDevirtualizer.cpp 2017-09-19 09:15:55.372478566 -0700 -+++ b/lib/SILOptimizer/Transforms/SpeculativeDevirtualizer.cpp 2017-09-19 10:37:02.517214683 -0700 -@@ -488,7 +488,7 @@ static bool tryToSpeculateTarget(FullApp - if (auto EMT = SubType.getAs<AnyMetatypeType>()) { - auto InstTy = ClassType.getSwiftRValueType(); - auto *MetaTy = MetatypeType::get(InstTy, EMT->getRepresentation()); -- auto CanMetaTy = CanMetatypeType::CanTypeWrapper(MetaTy); -+ auto CanMetaTy = typename CanMetatypeType::CanTypeWrapper(MetaTy); - ClassOrMetatypeType = SILType::getPrimitiveObjectType(CanMetaTy); - } - -diff -rupN a/lib/SILOptimizer/Utils/Local.cpp b/lib/SILOptimizer/Utils/Local.cpp ---- a/lib/SILOptimizer/Utils/Local.cpp 2017-09-19 09:15:55.592480918 -0700 -+++ b/lib/SILOptimizer/Utils/Local.cpp 2017-09-19 10:07:01.376380235 -0700 -@@ -2248,7 +2248,7 @@ CastOptimizer::optimizeCheckedCastBranch - auto EMT = dyn_cast<AnyMetatypeType>(EmiTy.getSwiftRValueType()); - auto *MetaTy = MetatypeType::get(LoweredConcreteTy.getSwiftRValueType(), - EMT->getRepresentation()); -- auto CanMetaTy = CanMetatypeType::CanTypeWrapper(MetaTy); -+ auto CanMetaTy = typename CanMetatypeType::CanTypeWrapper(MetaTy); - auto SILMetaTy = SILType::getPrimitiveObjectType(CanMetaTy); - SILBuilderWithScope B(Inst); - auto *MI = B.createMetatype(FoundIEI->getLoc(), SILMetaTy); -@@ -2303,7 +2303,7 @@ CastOptimizer::optimizeCheckedCastBranch - // Get the SIL metatype of this type. - auto EMT = dyn_cast<AnyMetatypeType>(EMI->getType().getSwiftRValueType()); - auto *MetaTy = MetatypeType::get(ConcreteTy, EMT->getRepresentation()); -- auto CanMetaTy = CanMetatypeType::CanTypeWrapper(MetaTy); -+ auto CanMetaTy = typename CanMetatypeType::CanTypeWrapper(MetaTy); - auto SILMetaTy = SILType::getPrimitiveObjectType(CanMetaTy); - SILBuilderWithScope B(Inst); - auto *MI = B.createMetatype(FoundIERI->getLoc(), SILMetaTy); diff --git a/glibc-2.26-compiler-rt-compat.patch b/glibc-2.26-compiler-rt-compat.patch new file mode 100644 index 000000000000..6d7071b35aeb --- /dev/null +++ b/glibc-2.26-compiler-rt-compat.patch @@ -0,0 +1,118 @@ +From 8a5e425a68de4d2c80ff00a97bbcb3722a4716da Mon Sep 17 00:00:00 2001 +From: Kostya Serebryany <kcc@google.com> +Date: Thu, 13 Jul 2017 21:59:01 +0000 +Subject: [PATCH] Fix sanitizer build against latest glibc + +Summary: +libsanitizer doesn't build against latest glibc anymore, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81066 for details. +One of the changes is that stack_t changed from typedef struct sigaltstack { ... } stack_t; to typedef struct { ... } stack_t; for conformance reasons. +And the other change is that the glibc internal __need_res_state macro is now ignored, so when doing +``` +#define __need_res_state +#include <resolv.h> +``` +the effect is now the same as just +``` +#include <resolv.h> +``` +and thus one doesn't get just the +``` +struct __res_state { ... }; +``` +definition, but newly also the +``` +extern struct __res_state *__res_state(void) __attribute__ ((__const__)); +``` +prototype. So __res_state is no longer a type, but a function. + +Reviewers: kcc, ygribov + +Reviewed By: kcc + +Subscribers: kubamracek + +Differential Revision: https://reviews.llvm.org/D35246 + +git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307969 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + lib/sanitizer_common/sanitizer_linux.cc | 3 +-- + lib/sanitizer_common/sanitizer_linux.h | 4 +--- + lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc | 2 +- + lib/tsan/rtl/tsan_platform_linux.cc | 2 +- + 4 files changed, 4 insertions(+), 7 deletions(-) + +diff --git a/lib/sanitizer_common/sanitizer_linux.cc b/lib/sanitizer_common/sanitizer_linux.cc +index a79a2a155..8c3c1e5d6 100644 +--- a/lib/sanitizer_common/sanitizer_linux.cc ++++ b/lib/sanitizer_common/sanitizer_linux.cc +@@ -629,8 +629,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) { + } + #endif + +-uptr internal_sigaltstack(const struct sigaltstack *ss, +- struct sigaltstack *oss) { ++uptr internal_sigaltstack(const void *ss, void *oss) { + return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss); + } + +diff --git a/lib/sanitizer_common/sanitizer_linux.h b/lib/sanitizer_common/sanitizer_linux.h +index ee336f7dd..11cad6b80 100644 +--- a/lib/sanitizer_common/sanitizer_linux.h ++++ b/lib/sanitizer_common/sanitizer_linux.h +@@ -21,7 +21,6 @@ + #include "sanitizer_platform_limits_posix.h" + + struct link_map; // Opaque type returned by dlopen(). +-struct sigaltstack; + + namespace __sanitizer { + // Dirent structure for getdents(). Note that this structure is different from +@@ -30,8 +29,7 @@ struct linux_dirent; + + // Syscall wrappers. + uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count); +-uptr internal_sigaltstack(const struct sigaltstack* ss, +- struct sigaltstack* oss); ++uptr internal_sigaltstack(const void* ss, void* oss); + uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set, + __sanitizer_sigset_t *oldset); + +diff --git a/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc +index 03f73ae88..d7fa5f645 100644 +--- a/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc ++++ b/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc +@@ -287,7 +287,7 @@ static int TracerThread(void* argument) { + + // Alternate stack for signal handling. + InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize); +- struct sigaltstack handler_stack; ++ stack_t handler_stack; + internal_memset(&handler_stack, 0, sizeof(handler_stack)); + handler_stack.ss_sp = handler_stack_memory.data(); + handler_stack.ss_size = kHandlerStackSize; +diff --git a/lib/tsan/rtl/tsan_platform_linux.cc b/lib/tsan/rtl/tsan_platform_linux.cc +index 0ba01babe..ead1e5704 100644 +--- a/lib/tsan/rtl/tsan_platform_linux.cc ++++ b/lib/tsan/rtl/tsan_platform_linux.cc +@@ -286,7 +286,7 @@ void InitializePlatform() { + int ExtractResolvFDs(void *state, int *fds, int nfd) { + #if SANITIZER_LINUX && !SANITIZER_ANDROID + int cnt = 0; +- __res_state *statp = (__res_state*)state; ++ struct __res_state *statp = (struct __res_state*)state; + for (int i = 0; i < MAXNS && cnt < nfd; i++) { + if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1) + fds[cnt++] = statp->_u._ext.nssocks[i]; +diff --git a/lib/esan/esan_sideline_linux.cpp b/lib/esan/esan_sideline_linux.cpp +index d04f5909d6a2..bc272dfe49f8 100644 +--- 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/glibc-2.26.patch b/glibc-2.26.patch index 1c24f04bca95..dfbc94e11f09 100644 --- a/glibc-2.26.patch +++ b/glibc-2.26.patch @@ -1,7 +1,7 @@ diff -rupN a/llbuild/lib/BuildSystem/LaneBasedExecutionQueue.cpp b/llbuild/lib/BuildSystem/LaneBasedExecutionQueue.cpp --- a/llbuild/lib/BuildSystem/LaneBasedExecutionQueue.cpp 2017-09-12 08:26:14.320282043 -0700 +++ b/llbuild/lib/BuildSystem/LaneBasedExecutionQueue.cpp 2017-09-12 08:25:50.040024445 -0700 -@@ -231,7 +231,7 @@ public: +@@ -260,7 +260,7 @@ public: #if defined(__linux__) sigset_t mostSignals; sigemptyset(&mostSignals); @@ -13,7 +13,7 @@ diff -rupN a/llbuild/lib/BuildSystem/LaneBasedExecutionQueue.cpp b/llbuild/lib/B diff -rupN a/llbuild/lib/Commands/NinjaBuildCommand.cpp b/llbuild/lib/Commands/NinjaBuildCommand.cpp --- a/llbuild/lib/Commands/NinjaBuildCommand.cpp 2017-09-12 08:26:14.320282043 -0700 +++ b/llbuild/lib/Commands/NinjaBuildCommand.cpp 2017-09-12 08:25:50.040024445 -0700 -@@ -1164,7 +1164,7 @@ buildCommand(BuildContext& context, ninj +@@ -1181,7 +1181,7 @@ buildCommand(BuildContext& context, ninj #if defined(__linux__) sigset_t mostSignals; sigemptyset(&mostSignals); @@ -33,7 +33,7 @@ diff -rupN a/swift/stdlib/public/stubs/Stubs.cpp b/swift/stdlib/public/stubs/Stu +#include <locale.h> #endif #include <limits> - #include "llvm/ADT/StringExtras.h" + #include <thread> diff -rupN a/swift-corelibs-foundation/CoreFoundation/Base.subproj/CFInternal.h b/swift-corelibs-foundation/CoreFoundation/Base.subproj/CFInternal.h --- a/swift-corelibs-foundation/CoreFoundation/Base.subproj/CFInternal.h 2017-09-12 08:25:03.549531343 -0700 +++ b/swift-corelibs-foundation/CoreFoundation/Base.subproj/CFInternal.h 2017-09-12 08:27:17.330950766 -0700 @@ -46,13 +46,13 @@ diff -rupN a/swift-corelibs-foundation/CoreFoundation/Base.subproj/CFInternal.h #endif #include <unistd.h> #include <sys/time.h> -diff -rupN a/swiftpm/Sources/Utility/Process.swift b/swiftpm/Sources/Utility/Process.swift ---- a/swiftpm/Sources/Utility/Process.swift 2017-09-12 09:03:10.154395376 -0700 -+++ b/swiftpm/Sources/Utility/Process.swift 2017-09-12 09:03:36.114680619 -0700 -@@ -140,7 +140,7 @@ public final class Process: ObjectIdenti +diff -rupN a/swiftpm/Sources/Basic/Process.swift b/swiftpm/Sources/Basic/Process.swift +--- a/swiftpm/Sources/Basic/Process.swift 2017-09-12 09:03:10.154395376 -0700 ++++ b/swiftpm/Sources/Basic/Process.swift 2017-09-12 09:03:36.114680619 -0700 +@@ -258,7 +258,7 @@ public final class Process: ObjectIdenti // modify, so we have to take care about the set we use. var mostSignals = sigset_t() - sigemptyset(&mostSignals); + sigemptyset(&mostSignals) - for i in 1 ..< SIGUNUSED { + for i in 1 ..< SIGSYS { if i == SIGKILL || i == SIGSTOP { diff --git a/icu59.patch b/icu59.patch index 1fe69f72b626..a63a577b7d15 100644 --- a/icu59.patch +++ b/icu59.patch @@ -1,7 +1,7 @@ diff -rupN a/stdlib/public/stubs/UnicodeNormalization.cpp b/stdlib/public/stubs/UnicodeNormalization.cpp ---- a/stdlib/public/stubs/UnicodeNormalization.cpp 2017-05-02 15:42:43.465819610 -0700 -+++ b/stdlib/public/stubs/UnicodeNormalization.cpp 2017-05-02 15:46:47.788404828 -0700 -@@ -86,11 +86,7 @@ private: +--- a/stdlib/public/stubs/UnicodeNormalization.cpp 2017-09-19 12:16:36.000000000 -0700 ++++ b/stdlib/public/stubs/UnicodeNormalization.cpp 2017-09-20 10:41:10.102292614 -0700 +@@ -87,11 +87,7 @@ private: for (unsigned char c = 0; c < 128; ++c) { UErrorCode ErrorCode = U_ZERO_ERROR; intptr_t NumCollationElts = 0; @@ -13,14 +13,14 @@ diff -rupN a/stdlib/public/stubs/UnicodeNormalization.cpp b/stdlib/public/stubs/ Buffer[0] = c; UCollationElements *CollationIterator = -@@ -127,18 +123,12 @@ swift::_swift_stdlib_unicode_compare_utf +@@ -128,18 +124,12 @@ swift::_swift_stdlib_unicode_compare_utf 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 -+ // ICU UChar type is always char16_t as of ICU 59. ++ // ICU UChar is always char16_t as of ICU 59. + // It seems that the underlying binary // representation is same with swift utf16 representation. return ucol_strcoll(GetRootCollator(), @@ -34,7 +34,7 @@ diff -rupN a/stdlib/public/stubs/UnicodeNormalization.cpp b/stdlib/public/stubs/ } /// Compares the strings via the Unicode Collation Algorithm on the root locale. -@@ -156,12 +146,8 @@ swift::_swift_stdlib_unicode_compare_utf +@@ -157,12 +147,8 @@ swift::_swift_stdlib_unicode_compare_utf UErrorCode ErrorCode = U_ZERO_ERROR; uiter_setUTF8(&LeftIterator, reinterpret_cast<const char *>(LeftString), LeftLength); @@ -47,7 +47,7 @@ diff -rupN a/stdlib/public/stubs/UnicodeNormalization.cpp b/stdlib/public/stubs/ uint32_t Diff = ucol_strcollIter(GetRootCollator(), &LeftIterator, &RightIterator, &ErrorCode); -@@ -199,14 +185,9 @@ swift::_swift_stdlib_unicode_compare_utf +@@ -200,14 +186,9 @@ swift::_swift_stdlib_unicode_compare_utf void *swift::_swift_stdlib_unicodeCollationIterator_create( const __swift_uint16_t *Str, __swift_uint32_t Length) { UErrorCode ErrorCode = U_ZERO_ERROR; @@ -62,7 +62,7 @@ diff -rupN a/stdlib/public/stubs/UnicodeNormalization.cpp b/stdlib/public/stubs/ if (U_FAILURE(ErrorCode)) { swift::crash("_swift_stdlib_unicodeCollationIterator_create: ucol_openElements() failed."); } -@@ -244,17 +225,11 @@ swift::_swift_stdlib_unicode_strToUpper( +@@ -245,17 +226,11 @@ swift::_swift_stdlib_unicode_strToUpper( const uint16_t *Source, int32_t SourceLength) { UErrorCode ErrorCode = U_ZERO_ERROR; @@ -80,7 +80,7 @@ diff -rupN a/stdlib/public/stubs/UnicodeNormalization.cpp b/stdlib/public/stubs/ if (U_FAILURE(ErrorCode) && ErrorCode != U_BUFFER_OVERFLOW_ERROR) { swift::crash("u_strToUpper: Unexpected error uppercasing unicode string."); } -@@ -271,17 +246,11 @@ swift::_swift_stdlib_unicode_strToLower( +@@ -272,17 +247,11 @@ swift::_swift_stdlib_unicode_strToLower( const uint16_t *Source, int32_t SourceLength) { UErrorCode ErrorCode = U_ZERO_ERROR; @@ -98,3 +98,16 @@ diff -rupN a/stdlib/public/stubs/UnicodeNormalization.cpp b/stdlib/public/stubs/ if (U_FAILURE(ErrorCode) && ErrorCode != U_BUFFER_OVERFLOW_ERROR) { swift::crash("u_strToLower: Unexpected error lowercasing unicode string."); } +@@ -330,9 +299,10 @@ void swift::__swift_stdlib_ubrk_close( + + 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, 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/sphinx1.6.patch b/sphinx1.6.patch deleted file mode 100644 index 9ccbea747be5..000000000000 --- a/sphinx1.6.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff -rupN a/docs/CMakeLists.txt b/docs/CMakeLists.txt ---- a/docs/CMakeLists.txt 2017-04-21 14:18:29.000000000 -0700 -+++ b/docs/CMakeLists.txt 2017-06-14 09:32:33.058127996 -0700 -@@ -11,7 +11,7 @@ SET(SWIFT_SPHINX_PAPER_SIZE "letter" - - SET(SPHINX_ARGS - -W -- -D latex_paper_size=${SWIFT_SPHINX_PAPER_SIZE} -+ -D latex_elements.papersize=${SWIFT_SPHINX_PAPER_SIZE} - -d ${CMAKE_BINARY_DIR}/doctrees) - - if(SPHINX_EXECUTABLE) -diff -rupN a/docs/conf.py b/docs/conf.py ---- a/docs/conf.py 2017-04-21 14:18:29.000000000 -0700 -+++ b/docs/conf.py 2017-06-14 10:03:22.266757932 -0700 -@@ -29,7 +29,7 @@ from datetime import date - extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.todo'] - - # Add any paths that contain templates here, relative to this directory. --templates_path = ['_templates'] -+templates_path = ['_templates', 'archive'] - - # The suffix of source filenames. - source_suffix = '.rst' -@@ -146,7 +146,7 @@ html_last_updated_fmt = '%Y-%m-%d' - - # Additional templates that should be rendered to pages, maps page names to - # template names. --html_additional_pages = {'LangRef': 'archive/LangRef.html'} -+html_additional_pages = {'archive/LangRef': 'LangRef.html'} - - # If false, no module index is generated. - # html_domain_indices = True -diff -rupN a/docs/Makefile b/docs/Makefile ---- a/docs/Makefile 2017-04-21 14:18:29.000000000 -0700 -+++ b/docs/Makefile 2017-06-14 09:28:39.455750766 -0700 -@@ -8,8 +8,8 @@ PAPER = - BUILDDIR = _build - - # Internal variables. --PAPEROPT_a4 = -D latex_paper_size=a4 --PAPEROPT_letter = -D latex_paper_size=letter -+PAPEROPT_a4 = -D latex_elements.papersize=a4 -+PAPEROPT_letter = -D latex_elements.papersize=letter - ALLSPHINXOPTS = -W -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - # the i18n builder cannot share the environment and doctrees with the others - I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -diff -rupN a/docs/proposals/InitializerInheritance.rst b/docs/proposals/InitializerInheritance.rst ---- a/docs/proposals/InitializerInheritance.rst 2017-04-21 14:18:29.000000000 -0700 -+++ b/docs/proposals/InitializerInheritance.rst 2017-06-14 10:03:51.077044885 -0700 -@@ -135,7 +135,7 @@ doing so is safe. - Complete object initializers - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Introduce the notion of a complete object initializer, which is --written as an initializer with ``Self`` as its return type [#], e.g.:: -+written as an initializer with ``Self`` as its return type [#]_, e.g.:: - - init() -> Self { - // ... |