summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRon Olson <tachoknight@gmail.com>2018-05-21 13:04:20 -0500
committerRon Olson <tachoknight@gmail.com>2018-05-21 13:04:20 -0500
commitaeddb53b5f16add2cee5774a4d1ed6236377de66 (patch)
tree8349743059fdcde18bf78bfb4e24a618d290c56a
parent2a261e62e208a3fab1abbb6da35126c9596e0617 (diff)
downloadswift-lang-aeddb53b5f16add2cee5774a4d1ed6236377de66.tar.gz
swift-lang-aeddb53b5f16add2cee5774a4d1ed6236377de66.tar.xz
swift-lang-aeddb53b5f16add2cee5774a4d1ed6236377de66.zip
Added patch to remove references to sys/ustat.h and updated to 2018-05-20 build
-rw-r--r--compiler-rt-no-ustat.patch49
-rw-r--r--swift-lang.spec16
2 files changed, 61 insertions, 4 deletions
diff --git a/compiler-rt-no-ustat.patch b/compiler-rt-no-ustat.patch
new file mode 100644
index 0000000..2499d66
--- /dev/null
+++ b/compiler-rt-no-ustat.patch
@@ -0,0 +1,49 @@
+--- compiler-rt-orig/lib/sanitizer_common/sanitizer_common_syscalls.inc 2018-05-21 10:41:12.089534263 -0500
++++ compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc 2018-05-21 10:47:21.172510188 -0500
+@@ -923,16 +923,6 @@
+ }
+ }
+
+-#if !SANITIZER_ANDROID
+-PRE_SYSCALL(ustat)(long dev, void *ubuf) {}
+-
+-POST_SYSCALL(ustat)(long res, long dev, void *ubuf) {
+- if (res >= 0) {
+- if (ubuf) POST_WRITE(ubuf, struct_ustat_sz);
+- }
+-}
+-#endif // !SANITIZER_ANDROID
+-
+ PRE_SYSCALL(stat64)(const void *filename, void *statbuf) {
+ if (filename)
+ PRE_READ(filename,
+diff -Naur compiler-rt-orig/lib/sanitizer_common/sanitizer_platform_limits_posix.cc compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+--- compiler-rt-orig/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 2018-05-21 10:41:12.080534263 -0500
++++ compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 2018-05-21 10:45:29.503517472 -0500
+@@ -159,7 +159,6 @@
+ # include <sys/procfs.h>
+ #endif
+ #include <sys/user.h>
+-#include <sys/ustat.h>
+ #include <linux/cyclades.h>
+ #include <linux/if_eql.h>
+ #include <linux/if_plip.h>
+@@ -253,7 +252,6 @@
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+- unsigned struct_ustat_sz = sizeof(struct ustat);
+ unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
+ unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
+ #endif // SANITIZER_LINUX && !SANITIZER_ANDROID
+diff -Naur compiler-rt-orig/lib/sanitizer_common/sanitizer_platform_limits_posix.h compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+--- compiler-rt-orig/lib/sanitizer_common/sanitizer_platform_limits_posix.h 2018-05-21 10:41:12.081534263 -0500
++++ compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h 2018-05-21 10:44:28.392521458 -0500
+@@ -197,7 +197,6 @@
+ int v[10];
+ };
+
+- extern unsigned struct_ustat_sz;
+ extern unsigned struct_rlimit64_sz;
+ extern unsigned struct_statvfs64_sz;
+
diff --git a/swift-lang.spec b/swift-lang.spec
index 86e201e..c722613 100644
--- a/swift-lang.spec
+++ b/swift-lang.spec
@@ -1,10 +1,10 @@
%global debug_package %{nil}
-%global swifttag 4.2-DEVELOPMENT-SNAPSHOT-2018-05-14-a
-%global swiftgithash f58f528
-%global swiftgitdate 20180514
+%global swifttag 4.2-DEVELOPMENT-SNAPSHOT-2018-05-20-a
+%global swiftgithash bb77484
+%global swiftgitdate 20180520
Name: swift-lang
Version: 4.2
-Release: 0.9.%{swiftgitdate}git%{swiftgithash}%{?dist}
+Release: 0.10.%{swiftgitdate}git%{swiftgithash}%{?dist}
Summary: Apple's Swift programming language
License: ASL 2.0
URL: https://swift.org
@@ -25,6 +25,7 @@ Source13: https://github.com/ninja-build/ninja/archive/v1.7.2.tar.gz#/ninj
Source14: swift-lang.conf
Patch0: %{name}-%{version}-change-lldb-location.patch
+Patch1: compiler-rt-no-ustat.patch
BuildRequires: which
BuildRequires: clang
@@ -91,6 +92,10 @@ mv ninja-1.7.2 ninja
# as the swift executable (i.e. /usr/bin).
%patch0 -p0
+# sys/ustat.h was removed from glibc (per https://sourceware.org/git/?p=glibc.git;a=commit;h=cf2478d53ad7071e84c724a986b56fe17f4f4ca7)
+# A patch has been submitted to resolve this upstream (https://github.com/apple/swift-compiler-rt/pull/20) but until
+# it is merged this patch is necessary to build Swift on Fedora with the latest glibc.
+%patch1 -p0
%build
export VERBOSE=1
@@ -170,6 +175,9 @@ install -m 0644 %{_builddir}/usr/share/man/man1/swift.1 %{buildroot}%{_mandir}/m
%postun -p /sbin/ldconfig
%changelog
+* Mon May 21 2018 Ron Olson <tachoknight@gmail.com> 4.2-0.10.20180520gitbb77484
+- Updated to swift-4.2-DEVELOPMENT-SNAPSHOT-2018-05-20-a and added
+ patch for removing sys/ustat.h references
* Tue May 15 2018 Ron Olson <tachoknight@gmail.com> 4.2-0.9.20180514gitf58f528
- Updated to swift-4.2-DEVELOPMENT-SNAPSHOT-2018-05-14-a
* Wed May 09 2018 Ron Olson <tachoknight@gmail.com> 4.2-0.8.20180508git0e6d867