import swift-lang-5.8.1-6.el10

i10ce changed/i10ce/swift-lang-5.8.1-6.el10
Arkady L. Shane 1 week ago
parent e7230472d9
commit abecedd736
Signed by: tigro
GPG Key ID: 1EC08A25C9DB2503

13
.gitignore vendored

@ -1,27 +1,19 @@
SOURCES/swift-format.zip
SOURCES/corelibs-foundation.tar.gz
SOURCES/swift-argument-parser.tar.gz
SOURCES/swift-tools-support-core.tar.gz
SOURCES/swift-certificates.tar.gz
SOURCES/swift-foundation-icu.zip
SOURCES/cmark.tar.gz
SOURCES/swift-nio-ssl.tar.gz
SOURCES/swift-system.tar.gz
SOURCES/ninja.tar.gz
SOURCES/swift-collections.tar.gz
SOURCES/zlib13.zip
SOURCES/swift-integration-tests.tar.gz
SOURCES/llvm-project.tar.gz
SOURCES/corelibs-libdispatch.tar.gz
SOURCES/swift-testing.tar.gz
SOURCES/swift-llvm-bindings.zip
SOURCES/swift-asn1.tar.gz
SOURCES/icu.tar.gz
SOURCES/swift-xcode-playground-support.tar.gz
SOURCES/swift-docc-render-artifact.tar.gz
SOURCES/swift-stress-tester.tar.gz
SOURCES/icu.zip
SOURCES/cmake.tar.gz
SOURCES/wasi-sdk.tar.gz
SOURCES/swift-experimental-string-processing.tar.gz
SOURCES/swift-markdown.tar.gz
SOURCES/swift-nio.tar.gz
@ -30,15 +22,14 @@ SOURCES/yams.tar.gz
SOURCES/swift-docc.tar.gz
SOURCES/corelibs-xctest.tar.gz
SOURCES/swift-syntax.tar.gz
SOURCES/swift-format.tar.gz
SOURCES/indexstore-db.tar.gz
SOURCES/swift-driver.tar.gz
SOURCES/swift-numerics.tar.gz
SOURCES/swift-crypto.tar.gz
SOURCES/swift-docc-symbolkit.tar.gz
SOURCES/swift-atomics.tar.gz
SOURCES/swift-foundation.zip
SOURCES/sourcekit-lsp.tar.gz
SOURCES/llbuild.tar.gz
SOURCES/wasm.tar.gz
SOURCES/package-manager.tar.gz
SOURCES/swift-lmdb.tar.gz

@ -1,44 +1,35 @@
6863d946ee58b4b461aeffa29be9ea9d88dc7cbe SOURCES/swift-format.zip
1bac0a81f60cfe052c5581ac9686f07cf1b80d0e SOURCES/corelibs-foundation.tar.gz
de44919bb1c585ff2a7e3f8cd76412f58a4f2f87 SOURCES/swift-argument-parser.tar.gz
63f25f19e42916ed4e6cba0ace7a9b5ce0f36340 SOURCES/swift-tools-support-core.tar.gz
c8eb1ca2a24b7d009c16f00e445d823c84563b36 SOURCES/swift-certificates.tar.gz
a98e74d4a1549431f69bdaadd2c00c7b63a35496 SOURCES/swift-foundation-icu.zip
fa5e159f8a475d12c062179346bbbc5f1594d875 SOURCES/cmark.tar.gz
7eaae0a62561c638d2e7da2526d88be4b72f2ed2 SOURCES/corelibs-foundation.tar.gz
8bc934d80ecbd17949799f2ab44167852521374b SOURCES/swift-argument-parser.tar.gz
1013e557f5dcda3e7cc8584f64892d3d092760bc SOURCES/swift-tools-support-core.tar.gz
fcc10cdd3d4899b6e2750cf5a2eed80b5cc358d3 SOURCES/cmark.tar.gz
a3e1626cad4c16dfeeb7858eecf9695881a2bfb1 SOURCES/swift-nio-ssl.tar.gz
42f0fc014f8f5f74aa34df5b10435219764470da SOURCES/swift-system.tar.gz
c8e8f166d8a796f68a9c86d27c9638cceb488735 SOURCES/swift-system.tar.gz
938723cdfc7a6f7c8f84c83b9a2cecdf1e5e1ad3 SOURCES/ninja.tar.gz
41d35cce01be048b5cd395154c57cf365e334216 SOURCES/swift-collections.tar.gz
3843d1306e02ee8b33315cc32478a94b17e9e881 SOURCES/zlib13.zip
aa1b3452bef5235fa745fc2ee0e07cac2464ec96 SOURCES/swift-integration-tests.tar.gz
161869d6346bac79495fe3532978236557c832c0 SOURCES/llvm-project.tar.gz
79ef3b1e65cd467ec27353ecfff91aeae2cfbfe8 SOURCES/corelibs-libdispatch.tar.gz
ea8cbb4d371fe2a0f6609a6d63f1a742780cba24 SOURCES/swift-testing.tar.gz
c345d6ae9692ec2b506040fce742918126ecf534 SOURCES/swift-llvm-bindings.zip
53337a463a0ca37973e9b6ca154539332d54ecc1 SOURCES/swift-asn1.tar.gz
cc52e147d3557947f3938d07227c9bc32a36ba18 SOURCES/swift-xcode-playground-support.tar.gz
e20b12f480914fe05976605800fa78bd20f2f9d1 SOURCES/swift-docc-render-artifact.tar.gz
f766142416071abf75605203c77d417abc499472 SOURCES/swift-stress-tester.tar.gz
05f0246c247515b4de78603a0b784bab864c108c SOURCES/icu.zip
d8817dd867e82734f7ed5517899b4f794c951745 SOURCES/cmake.tar.gz
8678e3510c88ef1de4d8c2940fa8ddad8f4eb084 SOURCES/wasi-sdk.tar.gz
8ee33f463d74d7d270751cbfc64a260496589883 SOURCES/swift-experimental-string-processing.tar.gz
6798485353a95b920e1c7b10a43a199afc56e12f SOURCES/swift-markdown.tar.gz
2c5998cea26f8f4cfa0d391320302117a853ad56 SOURCES/swift-collections.tar.gz
f74089ccfbda40de91f2a3ce489f6dc7f9eb711e SOURCES/swift-integration-tests.tar.gz
3dc8cf6b3a090a17842025ecd8ff3737f0265e9c SOURCES/llvm-project.tar.gz
d155767a4caaa79bb841e481819bc706a6cdf868 SOURCES/corelibs-libdispatch.tar.gz
34a0cbd269c439ba5a6a8845e41e884849b82361 SOURCES/icu.tar.gz
baba316bf2f40a5ba6549939468ee5ff9d6b4150 SOURCES/swift-xcode-playground-support.tar.gz
0f97bf2725c19157c16c9c07ed0896a612a821c1 SOURCES/swift-docc-render-artifact.tar.gz
66f623787c2ad7ec89a5f467b78094707deb21d7 SOURCES/swift-stress-tester.tar.gz
fa00fdaa53b2e4aaaba0f2401bcaa59a3d759ba5 SOURCES/cmake.tar.gz
e5258176f7202dc7bd334a561adc6374aa2ab41c SOURCES/swift-experimental-string-processing.tar.gz
80f08568ba67e8255c7763971f125ef640865de3 SOURCES/swift-markdown.tar.gz
ff3109e3a813275eccc6b01b64ddb371514704c9 SOURCES/swift-nio.tar.gz
d9dde98ca27203370068ea7b88980e35f072a466 SOURCES/swift.tar.gz
29f8767a7829327b11a553ae46667068fd36fa9e SOURCES/yams.tar.gz
b94a5aa675847d77f4505b9dd6bc36d8ef77238b SOURCES/swift-docc.tar.gz
ed438a2c2a7181dbac45eb803485b1db86249686 SOURCES/corelibs-xctest.tar.gz
572b7eff938d207a280eb350e20dfda8313e48ac SOURCES/swift-syntax.tar.gz
75db4619bca88faf3e1a990a3d775f06ec85e61a SOURCES/indexstore-db.tar.gz
a9a38ae51bc399c2234186f1518967806afeb774 SOURCES/swift-driver.tar.gz
16e33542ea6f469a23d89520295a6bfaa8b85597 SOURCES/swift-numerics.tar.gz
b41e721e20e4b06ef8c369e41404de9b348c36fc SOURCES/swift-crypto.tar.gz
3c501918cfcebe96e2b1f13b6c2a6069c62d9839 SOURCES/swift-docc-symbolkit.tar.gz
6b11f795023f544d2879c5e0c95bdda0e99f3c61 SOURCES/swift-atomics.tar.gz
6d0d5912f15c8121d8fbff5fb6eadd374f7cb9e8 SOURCES/swift-foundation.zip
2d414e9304207ce995ba7a97b93a0f9927ec2365 SOURCES/sourcekit-lsp.tar.gz
80cde70dea69623c4d59c8791fd30aabb600f1af SOURCES/llbuild.tar.gz
34e35e2b41e5ffe7fdd73adcad2d1e389d6fb9bb SOURCES/wasm.tar.gz
3e308306eec5c70d372542ff2252bd5c295c3b89 SOURCES/package-manager.tar.gz
938f9247a63981648453cfd0801f89bdfa0c05b2 SOURCES/swift-lmdb.tar.gz
04f5fac3c4b9a671ecd0117e638faba7dcd8711e SOURCES/swift.tar.gz
790ea44f909a42735ec5ccfdb2bf82f611b5496a SOURCES/yams.tar.gz
2775c2609392446241c9479e20189bba8bd21881 SOURCES/swift-docc.tar.gz
84b09051abaec6b120e379544e9c4c5aa92f3048 SOURCES/corelibs-xctest.tar.gz
2c8ce5eb1e0a0c083254b9867cd118dc5fd43d3e SOURCES/swift-syntax.tar.gz
c8da0ed80080cbf44f0d50ceb7b1af4ad27015d4 SOURCES/swift-format.tar.gz
e1b52820f0f87c88e0696eaf886f25ffd520d740 SOURCES/indexstore-db.tar.gz
6e944f9b0585881d3f9d41823bc4707733e82c0a SOURCES/swift-driver.tar.gz
f3e2473e35025d99f885a1d72aff8527aaa4c3bf SOURCES/swift-numerics.tar.gz
e4fd467b67de218a02928a9b187ee705c1c81238 SOURCES/swift-crypto.tar.gz
0d6a4008a55701ab303aa7fc94d83186696a803b SOURCES/swift-docc-symbolkit.tar.gz
5903a7bcd420e1fa5a60b68e98dd7635d36683ec SOURCES/swift-atomics.tar.gz
89739d019053eb4d0ab46f94922b3a36c8424661 SOURCES/sourcekit-lsp.tar.gz
20ff30878e1da8c80c52256bc220ec615d5f824c SOURCES/llbuild.tar.gz
50554e95742746a39aad8a147e262991ecf9dd6a SOURCES/package-manager.tar.gz
c36a2b249f102606a62b4bd6401e799331235cbe SOURCES/swift-lmdb.tar.gz

@ -0,0 +1,32 @@
diff --color -Naur llvm-project-orig/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
--- llvm-project-orig/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp 2024-06-21 17:13:30.216450095 -0500
+++ llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp 2024-06-21 17:17:12.418191122 -0500
@@ -76,7 +76,7 @@
#elif PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 7
return _Py_Finalizing != nullptr;
#else
- return _Py_IsFinalizing();
+ return Py_IsFinalizing();
#endif
}
diff --color -Naur llvm-project-orig/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
--- llvm-project-orig/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp 2024-06-21 17:13:30.217450161 -0500
+++ llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp 2024-06-21 17:18:29.299291469 -0500
@@ -201,16 +201,6 @@
return;
#endif
- if (PyEval_ThreadsInitialized()) {
- Log *log = GetLog(LLDBLog::Script);
-
- m_was_already_initialized = true;
- m_gil_state = PyGILState_Ensure();
- LLDB_LOGV(log, "Ensured PyGILState. Previous state = {0}locked\n",
- m_gil_state == PyGILState_UNLOCKED ? "un" : "");
- return;
- }
-
// InitThreads acquires the GIL if it hasn't been called before.
PyEval_InitThreads();
}

@ -0,0 +1,11 @@
--- swift/utils/build-presets.ini.orig 2024-12-18 16:04:59.478543323 -0600
+++ swift/utils/build-presets.ini 2024-12-18 16:07:08.704085878 -0600
@@ -857,7 +857,7 @@
mixin_linux_installation
build-subdir=buildbot_linux
lldb
-release
+debug
test
validation-test
long-test

@ -0,0 +1,39 @@
diff --color -Naur swift-corelibs-libdispatch-orig/src/apply.c swift-corelibs-libdispatch/src/apply.c
--- swift-corelibs-libdispatch-orig/src/apply.c 2022-10-01 10:48:05.000000000 -0500
+++ swift-corelibs-libdispatch/src/apply.c 2024-12-17 14:56:01.110477562 -0600
@@ -20,6 +20,9 @@
#include "internal.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-function-type-mismatch"
+
typedef void (*dispatch_apply_function_t)(void *, size_t);
static char const * const _dispatch_apply_key = "apply";
@@ -366,3 +369,6 @@
(dispatch_apply_function_t)_dispatch_Block_invoke(work));
}
#endif
+
+#pragma GCC diagnostic pop
+
diff --color -Naur swift-corelibs-libdispatch-orig/src/data.c swift-corelibs-libdispatch/src/data.c
--- swift-corelibs-libdispatch-orig/src/data.c 2022-10-01 10:48:05.000000000 -0500
+++ swift-corelibs-libdispatch/src/data.c 2024-12-17 14:57:39.514903781 -0600
@@ -20,6 +20,9 @@
#include "internal.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-function-type-mismatch"
+
/*
* Dispatch data objects are dispatch objects with standard retain/release
* memory management. A dispatch data object either points to a number of other
@@ -738,3 +741,5 @@
return mep;
}
#endif // HAVE_MACH
+
+#pragma GCC diagnostic pop

@ -1,11 +0,0 @@
--- swift/utils/build-script-impl.orig 2024-06-25 09:36:26.767949217 -0500
+++ swift/utils/build-script-impl 2024-06-25 09:36:46.207322186 -0500
@@ -2243,7 +2243,7 @@
-DLLDB_ENABLE_CURSES=ON
-DLLDB_ENABLE_LIBEDIT=ON
-DLLDB_ENABLE_PYTHON=ON
- -DLLDB_ENABLE_LZMA=OFF
+ -DLLDB_ENABLE_LZMA=ON
-DLLDB_ENABLE_LUA=OFF
-DLLDB_INCLUDE_TESTS:BOOL="${should_configure_tests}"
-DLLDB_TEST_LIBCXX_ROOT_DIR:STRING="${libcxx_build_dir}"

@ -0,0 +1,11 @@
--- swift/utils/build-script-impl.orig 2022-04-12 11:12:59.832022240 -0500
+++ swift/utils/build-script-impl 2022-04-12 11:13:19.694223857 -0500
@@ -2272,7 +2272,7 @@
-DLLDB_ENABLE_CURSES=ON
-DLLDB_ENABLE_LIBEDIT=ON
-DLLDB_ENABLE_PYTHON=ON
- -DLLDB_ENABLE_LZMA=OFF
+ -DLLDB_ENABLE_LZMA=ON
-DLLDB_ENABLE_LUA=OFF
-DLLDB_INCLUDE_TESTS:BOOL=$(false_true ${BUILD_TOOLCHAIN_ONLY})
-DLLDB_TEST_USER_ARGS="${DOTEST_ARGS}"

@ -0,0 +1,40 @@
--- swift-tools-support-core/Sources/TSCBasic/FileSystem.swift.orig 2024-06-07 15:57:58.282574272 -0500
+++ swift-tools-support-core/Sources/TSCBasic/FileSystem.swift 2024-06-07 16:00:41.442339293 -0500
@@ -425,19 +425,19 @@
if fp == nil {
throw FileSystemError(errno: errno, path)
}
- defer { fclose(fp) }
+ defer { fclose(fp!) }
// Read the data one block at a time.
let data = BufferedOutputByteStream()
var tmpBuffer = [UInt8](repeating: 0, count: 1 << 12)
while true {
- let n = fread(&tmpBuffer, 1, tmpBuffer.count, fp)
+ let n = fread(&tmpBuffer, 1, tmpBuffer.count, fp!)
if n < 0 {
if errno == EINTR { continue }
throw FileSystemError(.ioError(code: errno), path)
}
if n == 0 {
- let errno = ferror(fp)
+ let errno = ferror(fp!)
if errno != 0 {
throw FileSystemError(.ioError(code: errno), path)
}
@@ -455,12 +455,12 @@
if fp == nil {
throw FileSystemError(errno: errno, path)
}
- defer { fclose(fp) }
+ defer { fclose(fp!) }
// Write the data in one chunk.
var contents = bytes.contents
while true {
- let n = fwrite(&contents, 1, contents.count, fp)
+ let n = fwrite(&contents, 1, contents.count, fp!)
if n < 0 {
if errno == EINTR { continue }
throw FileSystemError(.ioError(code: errno), path)

@ -0,0 +1,15 @@
--- llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp.orig 2022-08-03 19:13:51.591055629 -0500
+++ llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp 2022-08-03 19:13:56.112348435 -0500
@@ -73,7 +73,11 @@
#include <sys/vt.h>
#include <linux/cdrom.h>
#include <linux/fd.h>
-#include <linux/fs.h>
+//#include <linux/fs.h>
+#define FS_IOC_GETFLAGS _IOR('f', 1, long)
+#define FS_IOC_SETFLAGS _IOW('f', 2, long)
+#define FS_IOC_GETVERSION _IOR('v', 1, long)
+#define FS_IOC_SETVERSION _IOW('v', 2, long)
#include <linux/hdreg.h>
#include <linux/input.h>
#include <linux/ioctl.h>

@ -1,18 +0,0 @@
--- swift-corelibs-foundation/Sources/CoreFoundation/internalInclude/CoreFoundation_Prefix.h.orig 2024-07-31 10:29:42.005997906 -0500
+++ swift-corelibs-foundation/Sources/CoreFoundation/internalInclude/CoreFoundation_Prefix.h 2024-07-31 10:31:06.147568761 -0500
@@ -200,6 +200,7 @@
#endif
#if !TARGET_OS_MAC
+#if 0
#if !HAVE_STRLCPY
CF_INLINE size_t
strlcpy(char * dst, const char * src, size_t maxlen) {
@@ -229,6 +230,7 @@
return dstlen + srclen;
}
#endif
+#endif // XYZZY - We do have them in Fedora
#endif // !TARGET_OS_MAC
#if TARGET_OS_WIN32

@ -1,8 +1,8 @@
diff --color -Naur llvm-project-orig/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
--- llvm-project-orig/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp 2024-08-03 13:04:05.441817601 -0500
+++ llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp 2024-08-03 13:14:00.001254584 -0500
@@ -74,7 +74,7 @@
#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 7
--- llvm-project-orig/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp 2024-09-19 10:08:49.705575598 -0500
+++ llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp 2024-09-19 10:10:32.912369606 -0500
@@ -76,7 +76,7 @@
#elif PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 7
return _Py_Finalizing != nullptr;
#else
- return _Py_IsFinalizing();
@ -11,9 +11,9 @@ diff --color -Naur llvm-project-orig/lldb/source/Plugins/ScriptInterpreter/Pytho
}
diff --color -Naur llvm-project-orig/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
--- llvm-project-orig/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp 2024-08-03 13:04:05.442817667 -0500
+++ llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp 2024-08-03 13:12:15.688335534 -0500
@@ -182,7 +182,7 @@
--- llvm-project-orig/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp 2024-09-19 10:08:49.706575663 -0500
+++ llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp 2024-09-19 10:12:11.357850178 -0500
@@ -201,7 +201,7 @@
return;
#endif
@ -22,7 +22,7 @@ diff --color -Naur llvm-project-orig/lldb/source/Plugins/ScriptInterpreter/Pytho
Log *log = GetLog(LLDBLog::Script);
m_was_already_initialized = true;
@@ -191,9 +191,6 @@
@@ -210,9 +210,6 @@
m_gil_state == PyGILState_UNLOCKED ? "un" : "");
return;
}

@ -1,11 +0,0 @@
--- cmark/CMakeLists.txt.orig 2024-06-11 14:38:17.531997089 -0500
+++ cmark/CMakeLists.txt 2024-06-11 14:38:24.161433974 -0500
@@ -22,6 +22,8 @@
set(CMAKE_INCLUDE_CURRENT_DIR YES)
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
option(CMARK_FUZZ_QUADRATIC "Build quadratic fuzzing harness" OFF)
option(CMARK_LIB_FUZZER "Build libFuzzer fuzzing harness" OFF)
option(CMARK_THREADING "Add locks around static accesses" OFF)

@ -0,0 +1,27 @@
diff --color -Naur swift-corelibs-foundation-orig/CoreFoundation/Base.subproj/CoreFoundation_Prefix.h swift-corelibs-foundation/CoreFoundation/Base.subproj/CoreFoundation_Prefix.h
--- swift-corelibs-foundation-orig/CoreFoundation/Base.subproj/CoreFoundation_Prefix.h 2023-07-06 10:02:48.000000000 -0500
+++ swift-corelibs-foundation/CoreFoundation/Base.subproj/CoreFoundation_Prefix.h 2023-08-16 12:53:42.332226574 -0500
@@ -189,7 +189,7 @@
#define CF_RETAIN_BALANCED_ELSEWHERE(obj, identified_location) do { } while (0)
#endif
-#if (TARGET_OS_LINUX && !TARGET_OS_ANDROID && !TARGET_OS_CYGWIN) || TARGET_OS_WIN32
+#if (TARGET_OS_LINUX && !TARGET_OS_ANDROID && !TARGET_OS_CYGWIN && !ALREADY_HAVE_STRL_FUNCS) || TARGET_OS_WIN32
CF_INLINE size_t
strlcpy(char * dst, const char * src, size_t maxlen) {
const size_t srclen = strlen(src);
diff --color -Naur swift-corelibs-foundation-orig/CoreFoundation/CMakeLists.txt swift-corelibs-foundation/CoreFoundation/CMakeLists.txt
--- swift-corelibs-foundation-orig/CoreFoundation/CMakeLists.txt 2023-07-06 10:02:48.000000000 -0500
+++ swift-corelibs-foundation/CoreFoundation/CMakeLists.txt 2023-08-16 12:53:44.851386844 -0500
@@ -80,6 +80,11 @@
add_compile_definitions($<$<COMPILE_LANGUAGE:C>:HAVE_SCHED_GETAFFINITY>)
endif()
endif()
+ # XYZZY
+ check_symbol_exists(strlcpy "string.h" HAVE_NEW_GLIBC)
+ if(HAVE_NEW_GLIBC)
+ add_compile_definitions($<$<COMPILE_LANGUAGE:C>:ALREADY_HAVE_STRL_FUNCS>)
+ endif()
endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL Windows)
# NOTE(compnerd) we only support building with the dynamic CRT as using the

@ -0,0 +1,11 @@
--- swift/utils/build-presets.ini.orig 2023-02-06 19:59:52.297617075 -0600
+++ swift/utils/build-presets.ini 2023-02-06 20:00:17.131186971 -0600
@@ -834,7 +834,7 @@
# 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
# Build the benchmarks against the toolchain.
toolchain-benchmarks

@ -1,83 +0,0 @@
diff --color -Naur llvm-project/clang/utils/creduce-clang-crash.py llvm-project/clang/utils/creduce-clang-crash.py
--- llvm-project/clang/utils/creduce-clang-crash.py 2024-06-13 19:54:42.303016942 -0500
+++ llvm-project/clang/utils/creduce-clang-crash.py 2024-06-13 19:57:15.922473813 -0500
@@ -15,7 +15,6 @@
import stat
import sys
import subprocess
-import pipes
import shlex
import tempfile
import shutil
@@ -61,7 +60,7 @@
def quote_cmd(cmd):
- return " ".join(pipes.quote(arg) for arg in cmd)
+ return " ".join(shlex.quote(arg) for arg in cmd)
def write_to_script(text, filename):
@@ -220,7 +219,7 @@
)
for msg in self.expected_output:
- output += "grep -F %s t.log || exit 1\n" % pipes.quote(msg)
+ output += "grep -F %s t.log || exit 1\n" % shlex.quote(msg)
write_to_script(output, self.testfile)
self.check_interestingness()
diff --color -Naur llvm-project/libcxx/utils/libcxx/test/dsl.py llvm-project/libcxx/utils/libcxx/test/dsl.py
--- llvm-project/libcxx/utils/libcxx/test/dsl.py 2024-06-13 19:55:23.627829920 -0500
+++ llvm-project/libcxx/utils/libcxx/test/dsl.py 2024-06-13 19:57:42.124257373 -0500
@@ -8,7 +8,7 @@
import os
import pickle
-import pipes
+import shlex
import platform
import re
import shutil
@@ -281,7 +281,7 @@
}
#endif
"""
- return programSucceeds(config, program, args=[pipes.quote(l) for l in locales])
+ return programSucceeds(config, program, args=[shlex.quote(l) for l in locales])
@_memoizeExpensiveOperation(lambda c, flags="": (c.substitutions, c.environment, flags))
diff --color -Naur llvm-project/libcxx/utils/libcxx/test/format.py llvm-project/libcxx/utils/libcxx/test/format.py
--- llvm-project/libcxx/utils/libcxx/test/format.py 2024-06-13 19:55:23.627829920 -0500
+++ llvm-project/libcxx/utils/libcxx/test/format.py 2024-06-13 19:58:01.911604299 -0500
@@ -11,7 +11,7 @@
import lit
import lit.formats
import os
-import pipes
+import shlex
import re
import shutil
diff --color -Naur ninja/configure.py ninja/configure.py
--- ninja/configure.py 2024-06-13 19:54:39.050795565 -0500
+++ ninja/configure.py 2024-06-13 19:56:39.970026531 -0500
@@ -23,7 +23,7 @@
from optparse import OptionParser
import os
-import pipes
+import shlex
import string
import subprocess
import sys
@@ -264,7 +264,7 @@
env_keys = set(['CXX', 'AR', 'CFLAGS', 'CXXFLAGS', 'LDFLAGS'])
configure_env = dict((k, os.environ[k]) for k in os.environ if k in env_keys)
if configure_env:
- config_str = ' '.join([k + '=' + pipes.quote(configure_env[k])
+ config_str = ' '.join([k + '=' + shlex.quote(configure_env[k])
for k in configure_env])
n.variable('configure_env', config_str + '$ ')
n.newline()

@ -0,0 +1,270 @@
diff --color -Naur llvm-project/clang/utils/creduce-clang-crash.py llvm-project/clang/utils/creduce-clang-crash.py
--- llvm-project/clang/utils/creduce-clang-crash.py 2024-06-20 13:38:53.943180833 -0500
+++ llvm-project/clang/utils/creduce-clang-crash.py 2024-06-20 13:42:30.244711005 -0500
@@ -14,7 +14,6 @@
import stat
import sys
import subprocess
-import pipes
import shlex
import tempfile
import shutil
@@ -57,7 +56,7 @@
sys.exit("ERROR: `%s` not found in %s" % (cmd_name, cmd_dir))
def quote_cmd(cmd):
- return ' '.join(pipes.quote(arg) for arg in cmd)
+ return ' '.join(shlex.quote(arg) for arg in cmd)
def write_to_script(text, filename):
with open(filename, 'w') as f:
@@ -199,7 +198,7 @@
""" % (disable_symbolization, quote_cmd(self.get_crash_cmd()))
for msg in self.expected_output:
- output += 'grep -F %s t.log || exit 1\n' % pipes.quote(msg)
+ output += 'grep -F %s t.log || exit 1\n' % shlex.quote(msg)
write_to_script(output, self.testfile)
self.check_interestingness()
diff --color -Naur llvm-project/compiler-rt/test/asan/lit.cfg.py llvm-project/compiler-rt/test/asan/lit.cfg.py
--- llvm-project/compiler-rt/test/asan/lit.cfg.py 2024-06-20 13:38:17.808753484 -0500
+++ llvm-project/compiler-rt/test/asan/lit.cfg.py 2024-06-20 13:43:18.446949016 -0500
@@ -6,14 +6,8 @@
import lit.formats
-# Get shlex.quote if available (added in 3.3), and fall back to pipes.quote if
-# it's not available.
-try:
- import shlex
- sh_quote = shlex.quote
-except:
- import pipes
- sh_quote = pipes.quote
+import shlex
+sh_quote = shlex.quote
def get_required_attr(config, attr_name):
attr_value = getattr(config, attr_name, None)
diff --color -Naur llvm-project/compiler-rt/test/lit.common.cfg.py llvm-project/compiler-rt/test/lit.common.cfg.py
--- llvm-project/compiler-rt/test/lit.common.cfg.py 2024-06-20 13:38:17.788752141 -0500
+++ llvm-project/compiler-rt/test/lit.common.cfg.py 2024-06-20 13:43:44.961730162 -0500
@@ -12,14 +12,8 @@
import lit.formats
import lit.util
-# Get shlex.quote if available (added in 3.3), and fall back to pipes.quote if
-# it's not available.
-try:
- import shlex
- sh_quote = shlex.quote
-except:
- import pipes
- sh_quote = pipes.quote
+import shlex
+sh_quote = shlex.quote
def find_compiler_libdir():
"""
diff --color -Naur llvm-project/compiler-rt/test/memprof/lit.cfg.py llvm-project/compiler-rt/test/memprof/lit.cfg.py
--- llvm-project/compiler-rt/test/memprof/lit.cfg.py 2024-06-20 13:38:17.852756440 -0500
+++ llvm-project/compiler-rt/test/memprof/lit.cfg.py 2024-06-20 13:44:09.179356996 -0500
@@ -6,14 +6,8 @@
import lit.formats
-# Get shlex.quote if available (added in 3.3), and fall back to pipes.quote if
-# it's not available.
-try:
- import shlex
- sh_quote = shlex.quote
-except:
- import pipes
- sh_quote = pipes.quote
+import shlex
+sh_quote = shlex.quote
def get_required_attr(config, attr_name):
attr_value = getattr(config, attr_name, None)
diff --color -Naur llvm-project/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py llvm-project/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py
--- llvm-project/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py 2024-06-20 13:38:17.946762755 -0500
+++ llvm-project/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py 2024-06-20 13:48:37.348371396 -0500
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
-import glob, os, pipes, sys, subprocess
+import glob, os, shlex, sys, subprocess
device_id = os.environ.get('SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER')
@@ -39,7 +39,7 @@
rm_args.append(arg)
else:
# FIXME(dliew): pipes.quote() is deprecated
- rm_args.append(pipes.quote(arg))
+ rm_args.append(shlex.quote(arg))
rm_cmd_line = ["/bin/rm"] + rm_args
rm_cmd_line_str = ' '.join(rm_cmd_line)
# We use `shell=True` so that any wildcard globs get expanded by the shell.
diff --color -Naur llvm-project/libcxx/utils/libcxx/test/config.py llvm-project/libcxx/utils/libcxx/test/config.py
--- llvm-project/libcxx/utils/libcxx/test/config.py 2024-06-20 13:38:59.394547032 -0500
+++ llvm-project/libcxx/utils/libcxx/test/config.py 2024-06-20 13:45:49.931125052 -0500
@@ -9,7 +9,6 @@
import copy
import os
import pkgutil
-import pipes
import platform
import re
import shlex
@@ -434,7 +433,7 @@
def quote(self, s):
if platform.system() == 'Windows':
return lit.TestRunner.quote_windows_command([s])
- return pipes.quote(s)
+ return shlex.quote(s)
def configure_substitutions(self):
sub = self.config.substitutions
diff --color -Naur llvm-project/libcxx/utils/libcxx/test/dsl.py llvm-project/libcxx/utils/libcxx/test/dsl.py
--- llvm-project/libcxx/utils/libcxx/test/dsl.py 2024-06-20 13:38:59.394547032 -0500
+++ llvm-project/libcxx/utils/libcxx/test/dsl.py 2024-06-20 13:45:11.318531231 -0500
@@ -8,7 +8,7 @@
import os
import pickle
-import pipes
+import shlex
import platform
import re
import shutil
@@ -261,7 +261,7 @@
}
#endif
"""
- return programSucceeds(config, program, args=[pipes.quote(l) for l in locales])
+ return programSucceeds(config, program, args=[shlex.quote(l) for l in locales])
@_memoizeExpensiveOperation(lambda c, flags='': (c.substitutions, c.environment, flags))
def compilerMacros(config, flags=''):
diff --color -Naur llvm-project/libcxx/utils/libcxx/test/format.py llvm-project/libcxx/utils/libcxx/test/format.py
--- llvm-project/libcxx/utils/libcxx/test/format.py 2024-06-20 13:38:59.394547032 -0500
+++ llvm-project/libcxx/utils/libcxx/test/format.py 2024-06-20 13:45:31.689899688 -0500
@@ -9,7 +9,7 @@
import lit
import lit.formats
import os
-import pipes
+import shlex
import re
import shutil
diff --color -Naur ninja/configure.py ninja/configure.py
--- ninja/configure.py 2024-06-20 13:38:14.957561954 -0500
+++ ninja/configure.py 2024-06-20 13:46:12.859665292 -0500
@@ -23,7 +23,7 @@
from optparse import OptionParser
import os
-import pipes
+import shlex
import string
import subprocess
import sys
@@ -264,7 +264,7 @@
env_keys = set(['CXX', 'AR', 'CFLAGS', 'CXXFLAGS', 'LDFLAGS'])
configure_env = dict((k, os.environ[k]) for k in os.environ if k in env_keys)
if configure_env:
- config_str = ' '.join([k + '=' + pipes.quote(configure_env[k])
+ config_str = ' '.join([k + '=' + shlex.quote(configure_env[k])
for k in configure_env])
n.variable('configure_env', config_str + '$ ')
n.newline()
diff --color -Naur swift/utils/build_swift/build_swift/shell.py swift/utils/build_swift/build_swift/shell.py
--- swift/utils/build_swift/build_swift/shell.py 2024-06-20 13:39:16.267680494 -0500
+++ swift/utils/build_swift/build_swift/shell.py 2024-06-20 13:47:56.850650939 -0500
@@ -23,7 +23,7 @@
import sys
from copy import copy as _copy
from pathlib import Path
-from pipes import quote as _quote
+from shlex import quote as _quote
from shlex import split
from subprocess import CalledProcessError
diff --color -Naur swift/utils/sil-opt-verify-all-modules.py swift/utils/sil-opt-verify-all-modules.py
--- swift/utils/sil-opt-verify-all-modules.py 2024-06-20 13:39:17.951793627 -0500
+++ swift/utils/sil-opt-verify-all-modules.py 2024-06-20 13:40:50.278995757 -0500
@@ -13,7 +13,7 @@
import glob
import multiprocessing
import os
-import pipes
+import shlex
import subprocess
import sys
import tempfile
@@ -91,7 +91,7 @@
def quote_shell_command(args):
- return " ".join([pipes.quote(a) for a in args])
+ return " ".join([shlex.quote(a) for a in args])
def run_commands_in_parallel(commands):
diff --color -Naur swift/utils/swift_build_support/swift_build_support/build_script_invocation.py swift/utils/swift_build_support/swift_build_support/build_script_invocation.py
--- swift/utils/swift_build_support/swift_build_support/build_script_invocation.py 2024-06-20 13:39:16.270680695 -0500
+++ swift/utils/swift_build_support/swift_build_support/build_script_invocation.py 2024-06-20 13:41:40.348359192 -0500
@@ -11,7 +11,7 @@
# ===---------------------------------------------------------------------===#
import os
-import pipes
+import shlex
import platform
from build_swift.build_swift import argparse
@@ -128,9 +128,9 @@
"--build-jobs", str(args.build_jobs),
"--lit-jobs", str(args.lit_jobs),
"--common-cmake-options=%s" % ' '.join(
- pipes.quote(opt) for opt in cmake.common_options()),
+ shlex.quote(opt) for opt in cmake.common_options()),
"--build-args=%s" % ' '.join(
- pipes.quote(arg) for arg in cmake.build_args()),
+ shlex.quote(arg) for arg in cmake.build_args()),
"--dsymutil-jobs", str(args.dsymutil_jobs),
]
@@ -388,7 +388,7 @@
if args.extra_cmake_options:
impl_args += [
"--extra-cmake-options=%s" % ' '.join(
- pipes.quote(opt) for opt in args.extra_cmake_options)
+ shlex.quote(opt) for opt in args.extra_cmake_options)
]
if args.lto_type is not None:
diff --color -Naur swift/utils/swift_build_support/swift_build_support/shell.py swift/utils/swift_build_support/swift_build_support/shell.py
--- swift/utils/swift_build_support/swift_build_support/shell.py 2024-06-20 13:39:16.271680762 -0500
+++ swift/utils/swift_build_support/swift_build_support/shell.py 2024-06-20 13:42:02.214828084 -0500
@@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
import os
-import pipes
+import shlex
import platform
import shutil
import subprocess
@@ -35,7 +35,7 @@
def _quote(arg):
- return pipes.quote(str(arg))
+ return shlex.quote(str(arg))
def quote_command(args):

@ -1,46 +0,0 @@
From f189a95d6371cdb44f773029f7a19b94f0d9a839 Mon Sep 17 00:00:00 2001
From: Finagolfin <finagolfin@tuta.io>
Date: Fri, 28 Jun 2024 20:06:06 +0530
Subject: [PATCH] [ClangImporter] Make sure the `-resource-dir` is checked
before the `-sdk`, as done everywhere else in the compiler
Otherwise, these module maps can be pulled from a system SDK instead when
building a fresh Swift stdlib, fixes #74696.
---
lib/ClangImporter/ClangIncludePaths.cpp | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/ClangImporter/ClangIncludePaths.cpp b/lib/ClangImporter/ClangIncludePaths.cpp
index 23431af724459..7e6ca8c2a9cb6 100644
--- a/lib/ClangImporter/ClangIncludePaths.cpp
+++ b/lib/ClangImporter/ClangIncludePaths.cpp
@@ -35,10 +35,10 @@ static std::optional<Path> getActualModuleMapPath(
Path result;
- StringRef SDKPath = Opts.getSDKPath();
- if (!SDKPath.empty()) {
- result.append(SDKPath.begin(), SDKPath.end());
- llvm::sys::path::append(result, "usr", "lib", "swift");
+ if (!Opts.RuntimeResourcePath.empty()) {
+ result.clear();
+ result.append(Opts.RuntimeResourcePath.begin(),
+ Opts.RuntimeResourcePath.end());
llvm::sys::path::append(result, platform);
if (isArchSpecific) {
llvm::sys::path::append(result, arch);
@@ -52,10 +52,10 @@ static std::optional<Path> getActualModuleMapPath(
return result;
}
- if (!Opts.RuntimeResourcePath.empty()) {
- result.clear();
- result.append(Opts.RuntimeResourcePath.begin(),
- Opts.RuntimeResourcePath.end());
+ StringRef SDKPath = Opts.getSDKPath();
+ if (!SDKPath.empty()) {
+ result.append(SDKPath.begin(), SDKPath.end());
+ llvm::sys::path::append(result, "usr", "lib", "swift");
llvm::sys::path::append(result, platform);
if (isArchSpecific) {
llvm::sys::path::append(result, arch);

@ -1 +0,0 @@
/usr/lib/swift/linux

@ -0,0 +1,10 @@
--- llvm-project/llvm/include/llvm/Support/Signals.h.orig 2023-01-25 12:42:42.006799309 -0600
+++ llvm-project/llvm/include/llvm/Support/Signals.h 2023-01-25 12:43:15.856946625 -0600
@@ -15,6 +15,7 @@
#define LLVM_SUPPORT_SIGNALS_H
#include <string>
+#include <stdint.h>
namespace llvm {
class StringRef;

@ -0,0 +1,14 @@
--- swift-corelibs-libdispatch/src/shims/yield.c.orig 2022-09-16 12:04:16.691448773 -0500
+++ swift-corelibs-libdispatch/src/shims/yield.c 2022-09-16 12:05:43.047145102 -0500
@@ -25,6 +25,11 @@
__DISPATCH_WAIT_FOR_ENQUEUER__(void **ptr)
{
int spins = 0;
+ int nothing = spins;
+ nothing = 23;
+ spins = nothing;
+ spins = 0;
+
void *value;
while ((value = os_atomic_load(ptr, relaxed)) == NULL) {
_dispatch_preemption_yield(++spins);

@ -1,9 +1,3 @@
# 6/27/24 - temporary disable __brp_add_determinism
# as it prevents the package from successfully building
%if 0%{?fedora} >= 41
# on Fedora 41/Rawhide
%undefine __brp_add_determinism
%endif
%global debug_package %{nil}
%undefine _auto_set_build_flags
@ -12,34 +6,28 @@
#################################################
# Make sure these are changed for every release!
#################################################
%global swift_version 6.0.1-RELEASE
%global package_version 6.0.1
%global fedora_release 1
%global swift_source_location swift-source
%global swift_version 5.8.1-RELEASE
%global fedora_release 6
%global package_version 5.8.1
# Set to the right version per the json file
%global icu_version 69
%global yams_version 5.0.6
%global swift_argument_parser_version 1.2.3
%global swift_crypto_version 3.0.0
%global swift_source_location swift-source
%global icu_version 65-1
%global yams_version 5.0.1
%global swift_argument_parser_version 1.0.3
%global swift_crypto_version 2.2.3
%global ninja_version 1.11.1
%global cmake_version 3.24.2
%global swift_atomics_version 1.2.0
%global swift_collections_version 1.1.2
%global swift_numerics_version 1.0.2
%global swift_system_version 1.3.0
%global cmake_version 3.19.6
%global swift_atomics_version 1.0.2
%global swift_collections_version 1.0.1
%global swift_numerics_version 1.0.1
%global swift_system_version 1.1.1
%global swift_nio_version 2.31.2
%global swift_nio_ssl_version 2.15.0
%global swift_certificates_version 1.0.1
%global swift_asn1_version 1.0.0
%global wasmkit_version 0.0.3
%global wasi_version 20
%global swift_format_version 6.0
%global swift_llvm_bindings_version 6.0
%global swift_foundation_icu_version 6.0
%global swift_foundation_version 6.0
%global zlib_version 1.3
# Temporary I presume as the json file suggests there should
# be eventually a release version of swift-format
%global swift_format_version 0.50700.1
Name: swift-lang
@ -64,66 +52,78 @@ Source11: https://github.com/apple/llvm-project/archive/swift-%{swift_vers
Source12: https://github.com/apple/swift-tools-support-core/archive/swift-%{swift_version}.tar.gz#/swift-tools-support-core.tar.gz
Source13: https://github.com/apple/swift-argument-parser/archive/%{swift_argument_parser_version}.tar.gz#/swift-argument-parser.tar.gz
Source14: https://github.com/apple/swift-driver/archive/swift-%{swift_version}.tar.gz#/swift-driver.tar.gz
Source15: https://github.com/apple/swift-syntax/archive/swift-%{swift_version}.zip#/swift-syntax.tar.gz
Source16: https://github.com/jpsim/Yams/archive/%{yams_version}.tar.gz#/yams.tar.gz
Source17: https://github.com/apple/swift-crypto/archive/refs/tags/%{swift_crypto_version}.tar.gz#/swift-crypto.tar.gz
Source18: https://github.com/ninja-build/ninja/archive/refs/tags/v%{ninja_version}.tar.gz#/ninja.tar.gz
Source19: https://github.com/KitWare/CMake/archive/refs/tags/v%{cmake_version}.tar.gz#/cmake.tar.gz
Source20: https://github.com/apple/swift-atomics/archive/%{swift_atomics_version}.tar.gz#/swift-atomics.tar.gz
Source21: https://github.com/apple/swift-stress-tester/archive/swift-%{swift_version}.tar.gz#/swift-stress-tester.tar.gz
Source22: https://github.com/apple/swift-docc/archive/swift-%{swift_version}.tar.gz#/swift-docc.tar.gz
Source23: https://github.com/apple/swift-docc-render-artifact/archive/swift-%{swift_version}.tar.gz#/swift-docc-render-artifact.tar.gz
Source24: https://github.com/apple/swift-docc-symbolkit/archive/swift-%{swift_version}.tar.gz#/swift-docc-symbolkit.tar.gz
Source25: https://github.com/apple/swift-collections/archive/%{swift_collections_version}.tar.gz#/swift-collections.tar.gz
Source26: https://github.com/apple/swift-numerics/archive/%{swift_numerics_version}.tar.gz#/swift-numerics.tar.gz
Source27: https://github.com/apple/swift-system/archive/%{swift_system_version}.tar.gz#/swift-system.tar.gz
Source28: https://github.com/apple/swift-nio/archive/%{swift_nio_version}.tar.gz#/swift-nio.tar.gz
Source29: https://github.com/apple/swift-nio-ssl/archive/%{swift_nio_ssl_version}.tar.gz#/swift-nio-ssl.tar.gz
Source30: https://github.com/apple/swift-format/archive/refs/heads/release/%{swift_format_version}.zip#/swift-format.zip
Source31: https://github.com/apple/swift-lmdb/archive/swift-%{swift_version}.tar.gz#/swift-lmdb.tar.gz
Source32: https://github.com/apple/swift-markdown/archive/swift-%{swift_version}.tar.gz#/swift-markdown.tar.gz
Source33: https://github.com/apple/swift-experimental-string-processing/archive/swift-%{swift_version}.tar.gz#/swift-experimental-string-processing.tar.gz
Source34: https://github.com/apple/swift-certificates/archive/%{swift_certificates_version}.tar.gz#/swift-certificates.tar.gz
Source35: https://github.com/apple/swift-asn1/archive/%{swift_asn1_version}.tar.gz#/swift-asn1.tar.gz
Source36: https://github.com/unicode-org/icu/archive/refs/heads/maint/maint-%{icu_version}.zip#/icu.zip
Source37: https://github.com/swiftwasm/WasmKit/archive/refs/tags/%{wasmkit_version}.tar.gz#/wasm.tar.gz
Source38: https://github.com/WebAssembly/wasi-libc/archive/refs/tags/wasi-sdk-%{wasi_version}.tar.gz#/wasi-sdk.tar.gz
Source39: https://github.com/apple/swift-llvm-bindings/archive/refs/heads/swift/release/%{swift_llvm_bindings_version}.zip#/swift-llvm-bindings.zip
Source40: https://github.com/apple/swift-foundation-icu/archive/refs/heads/release/%{swift_foundation_icu_version}.zip#/swift-foundation-icu.zip
Source41: https://github.com/apple/swift-foundation/archive/refs/heads/release/%{swift_foundation_version}.zip#/swift-foundation.zip
Source42: https://github.com/apple/swift-testing/archive/refs/tags/swift-%{swift_version}.tar.gz#/swift-testing.tar.gz
Source43: https://github.com/madler/zlib/releases/download/v%{zlib_version}/zlib13.zip
Source44: swiftlang.conf
Patch1: need_pic.patch
Patch2: no_pipes.patch
Patch3: enable_lzma.patch
Patch4: resource_dir.patch
Patch5: have_strcat.patch
Patch6: latest_python.patch
Source15: https://github.com/unicode-org/icu/archive/release-%{icu_version}.tar.gz#/icu.tar.gz
Source16: https://github.com/apple/swift-syntax/archive/swift-%{swift_version}.zip#/swift-syntax.tar.gz
Source17: https://github.com/jpsim/Yams/archive/%{yams_version}.tar.gz#/yams.tar.gz
Source18: https://github.com/apple/swift-crypto/archive/refs/tags/%{swift_crypto_version}.tar.gz#/swift-crypto.tar.gz
Source19: https://github.com/ninja-build/ninja/archive/refs/tags/v%{ninja_version}.tar.gz#/ninja.tar.gz
Source20: https://github.com/KitWare/CMake/archive/refs/tags/v%{cmake_version}.tar.gz#/cmake.tar.gz
Source21: https://github.com/apple/swift-atomics/archive/%{swift_atomics_version}.tar.gz#/swift-atomics.tar.gz
Source22: https://github.com/apple/swift-stress-tester/archive/swift-%{swift_version}.tar.gz#/swift-stress-tester.tar.gz
Source23: https://github.com/apple/swift-docc/archive/swift-%{swift_version}.tar.gz#/swift-docc.tar.gz
Source24: https://github.com/apple/swift-docc-render-artifact/archive/swift-%{swift_version}.tar.gz#/swift-docc-render-artifact.tar.gz
Source25: https://github.com/apple/swift-docc-symbolkit/archive/swift-%{swift_version}.tar.gz#/swift-docc-symbolkit.tar.gz
Source26: https://github.com/apple/swift-collections/archive/%{swift_collections_version}.tar.gz#/swift-collections.tar.gz
Source27: https://github.com/apple/swift-numerics/archive/%{swift_numerics_version}.tar.gz#/swift-numerics.tar.gz
Source28: https://github.com/apple/swift-system/archive/%{swift_system_version}.tar.gz#/swift-system.tar.gz
Source29: https://github.com/apple/swift-nio/archive/%{swift_nio_version}.tar.gz#/swift-nio.tar.gz
Source30: https://github.com/apple/swift-nio-ssl/archive/%{swift_nio_ssl_version}.tar.gz#/swift-nio-ssl.tar.gz
%dnl Source31: https://github.com/apple/swift-format/archive/swift-%{swift_version}.tar.gz#/swift-format.tar.gz
Source31: https://github.com/apple/swift-format/archive/refs/tags/%{swift_format_version}.tar.gz#/swift-format.tar.gz
Source32: https://github.com/apple/swift-lmdb/archive/swift-%{swift_version}.tar.gz#/swift-lmdb.tar.gz
Source33: https://github.com/apple/swift-markdown/archive/swift-%{swift_version}.tar.gz#/swift-markdown.tar.gz
Source34: https://github.com/apple/swift-experimental-string-processing/archive/swift-%{swift_version}.tar.gz#/swift-experimental-string-processing.tar.gz
%dnl Source35: https://github.com/apple/swift-llvm-bindings/archive/swift-%{swift_version}.tar.gz#/swift-llvm-bindings.tar.gz
Patch1: uintptr.patch
Patch2: enablelzma.patch
Patch3: fs.patch
Patch4: unusedvars.patch
Patch5: no-test.patch
Patch7: fclose_issues.patch
Patch8: new_glibc.patch
Patch9: no_pipes_58.patch
Patch10: cython_updates.patch
Patch11: latest_python.patch
Patch12: disable_warning.patch
Patch13: debug_build.patch
%ifarch aarch64
BuildRequires: clang >= 15
%else
BuildRequires: clang
%endif
BuildRequires: swig
BuildRequires: rsync
BuildRequires: python3
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-distro
BuildRequires: libbsd-devel
BuildRequires: libxml2-devel
BuildRequires: sqlite-devel
BuildRequires: libdispatch-devel
BuildRequires: libcurl-devel
BuildRequires: libuuid-devel
BuildRequires: libedit-devel
BuildRequires: libicu-devel
BuildRequires: perl-podlators
BuildRequires: swiftlang
BuildRequires: lld
BuildRequires: python3-six
BuildRequires: binutils-devel
%if ! 0%{?el8}
BuildRequires: python-unversioned-command
%endif
BuildRequires: binutils-gold
Requires: glibc-devel
Requires: binutils-gold
Requires: gcc
Requires: ncurses-devel
Requires: lldb
ExclusiveArch: x86_64 aarch64
Provides: swiftlang = %{version}-%{release}
Provides: swiftlang = %{version}-%{release}
%description
@ -139,12 +139,11 @@ correct programs easier for the developer.
%prep
%setup -q -c -n %{swift_source_location} -a 0 -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16 -a 17 -a 18 -a 19 -a 20 -a 21 -a 22 -a 23 -a 24 -a 25 -a 26 -a 27 -a 28 -a 29 -a 30 -a 31 -a 32 -a 33 -a 34 -a 35 -a 36 -a 37 -a 38 -a 39 -a 40 -a 41 -a 42 -a 43
%setup -q -c -n %{swift_source_location} -a 0 -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16 -a 17 -a 18 -a 19 -a 20 -a 21 -a 22 -a 23 -a 24 -a 25 -a 26 -a 27 -a 28 -a 29 -a 30 -a 31 -a 32 -a 33 -a 34
# The Swift build script requires directories to be named
# in a specific way so renaming the source directories is
# necessary
mv swift-cmark-swift-%{swift_version} cmark
mv swift-testing-swift-%{swift_version} swift-testing
mv swift-corelibs-foundation-swift-%{swift_version} swift-corelibs-foundation
mv swift-corelibs-libdispatch-swift-%{swift_version} swift-corelibs-libdispatch
mv swift-corelibs-xctest-swift-%{swift_version} swift-corelibs-xctest
@ -171,19 +170,15 @@ mv swift-numerics-%{swift_numerics_version} swift-numerics
mv swift-system-%{swift_system_version} swift-system
mv swift-nio-%{swift_nio_version} swift-nio
mv swift-nio-ssl-%{swift_nio_ssl_version} swift-nio-ssl
mv swift-format-release-%{swift_format_version} swift-format
%dnl mv swift-format-swift-%{swift_version} swift-format
mv swift-format-%{swift_format_version} swift-format
mv swift-lmdb-swift-%{swift_version} swift-lmdb
mv swift-markdown-swift-%{swift_version} swift-markdown
mv swift-stress-tester-swift-%{swift_version} swift-stress-tester
mv swift-experimental-string-processing-swift-%{swift_version} swift-experimental-string-processing
mv swift-certificates-%{swift_certificates_version} swift-certificates
mv swift-asn1-%{swift_asn1_version} swift-asn1
mv swift-llvm-bindings-swift-release-%{swift_llvm_bindings_version} swift-llvm-bindings
mv swift-foundation-icu-release-%{swift_foundation_icu_version} swift-foundation-icu
mv swift-foundation-release-%{swift_foundation_version} swift-foundation
# ICU
mv icu-maint-maint-%{icu_version} icu
mv icu-release-%{icu_version} icu
# Yams
mv Yams-%{yams_version} yams
@ -191,47 +186,59 @@ mv Yams-%{yams_version} yams
# Ninja
mv ninja-%{ninja_version} ninja
# WasmKit
mv WasmKit-%{wasmkit_version} wasmkit
# zlib
mv zlib-%{zlib_version} zlib
# Fix python to python3
%py3_shebang_fix swift/utils/api_checker/swift-api-checker.py
%py3_shebang_fix llvm-project/compiler-rt/lib/hwasan/scripts/hwasan_symbolize
# Enable PIC for cmark
# Fix for uinit_ptr not being declared implicitly
%patch -P1 -p0
# Pipes has been removed in Python
# Enable LZMA
%patch -P2 -p0
# Enable LZMA
%patch -P3 -p0
# https://github.com/swiftlang/swift/pull/74814
pushd swift
%patch -P4 -p1
popd
# Weird (hopefully temp) situation of strlcpy and strncat
# not being found at the system level
# This does not work for EPEL9, so we need to make sure
# that this patch is _not_ applied when building for EPEL9
%if ! 0%{?el9}
# Tests fail for some reason preventing the package from being built
%patch -P5 -p0
%endif
# After Python 3.12 certain functions have been removed,
# which is in Fedora 41
%if 0%{?fedora} >= 41
%patch -P6 -p0
# Issue with >= F39 not liking not having the file object
# explicitly forced in an fclose()
%patch -P7 -p0
# 39 and later, so this patch modifies the CMakeLists.txt file
# to add a check for them, along with a patch to the header
# file that if they are present, don't define the functions
# seperately.
%patch -P8 -p0
# For 41 and later, python pipes are no longer a thing
%patch -P9 -p0
# For 41 and later, some additional old parts removed
%dnl %patch -P10 -p0
# Python 3.12 changes
%dnl %patch -P11 -p0
# Warning as error in EPEL 10
%patch -P12 -p0
# Trying to troubleshoot compiler crash on aarch64
%ifarch aarch64
%patch -P13 -p0
%endif
%build
export VERBOSE=1
# Specific for aarch64 architecture
%ifarch aarch64
if [ ! -d $PWD/oldclang ] ; then
mkdir -p $PWD/oldclang
ln -s /usr/bin/clang-15 $PWD/oldclang/clang
ln -s /usr/bin/clang++-15 $PWD/oldclang/clang++
fi
export PATH=$PWD/oldclang:$PATH
%endif
# Here we go!
swift/utils/build-script --preset=buildbot_linux,no_test install_destdir=%{_builddir} installable_package=%{_builddir}/swift-%{version}-%{linux_version}.tar.gz
@ -247,11 +254,6 @@ mkdir -p %{buildroot}%{_mandir}/man1
cp %{_builddir}/usr/share/man/man1/swift.1 %{buildroot}%{_mandir}/man1/swift.1
mkdir -p %{buildroot}/usr/lib
ln -fs %{_libexecdir}/swift/%{package_version}/lib/swift %{buildroot}/usr/lib/swift
mkdir -p %{buildroot}%{_libdir}
ln -fs %{_libexecdir}/swift/%{package_version}/lib/lib{IndexStore,sourcekitdInProc,swiftDemangle}.so* %{buildroot}%{_libdir}/
mkdir -p %{buildroot}/%{_sysconfdir}/ld.so.conf.d/
install -m 0644 %{SOURCE44} %{buildroot}/%{_sysconfdir}/ld.so.conf.d/swiftlang.conf
# This is to fix an issue with check-rpaths complaining about
# how the Swift binaries use RPATH
@ -266,10 +268,6 @@ export QA_SKIP_RPATHS=1
%{_mandir}/man1/swift.1.gz
%{_libexecdir}/swift/
%{_usr}/lib/swift
%{_libdir}/libIndexStore.so*
%{_libdir}/libsourcekitdInProc.so*
%{_libdir}/libswiftDemangle.so*
%{_sysconfdir}/ld.so.conf.d/swiftlang.conf
%post -p /sbin/ldconfig
@ -277,33 +275,35 @@ export QA_SKIP_RPATHS=1
%changelog
* Sun Jan 05 2025 Arkady L. Shane <tigro@msvsphere-os.ru> - 6.0.1-1
* Sun Jan 05 2025 Arkady L. Shane <tigro@msvsphere-os.ru> - 5.8.1-6
- Rebuilt for MSVSphere 10
* Wed Sep 25 2024 Ron Olson <tachoknight@gmail.com> - 6.0.1-1
- Updated to Swift 6.0.1-RELEASE
Resolves: rhbz#2313366
* Mon Sep 16 2024 Ron Olson <tachoknight@gmail.com> - 6.0-1
- Updated to Swift 6.0-RELEASE
* Mon Aug 26 2024 Zephyr Lykos <fedora@mochaa.ws> - 6.0-1
- Export Swift development tool libraries to libdir
* Mon Jul 22 2024 Byoungchan Lee <byoungchan.lee@gmx.com> - 6.0-1
- Minimize runtime/compile time dependencies
* Fri Jul 19 2024 Ron Olson <tachoknight@gmail.com> - 6.0-1
- Added file to add the Swift libraries to the ld.so.conf.d directory
* Sun Jun 30 2024 Ron Olson <tachoknight@gmail.com> - 6.0-1
- Patch from finagolfin
https://github.com/swiftlang/swift/pull/74814
* Tue Apr 23 2024 Ron Olson <tachoknight@gmail.com> - 6.0-1
- First attempt at getting 6.0 working
* Mon Sep 18 2023 Ron Olson <tachoknight@gmail.com> - 5.9-1
- Updated to Swift 5.9-RELEASE
Resolves: rhbz#2239543
* Fri Sep 15 2023 Ron Olson <tachoknight@gmail.com> - 5.10-1
- First working version of Swift 5.10
* Wed Mar 29 2023 Ron Olson <tachoknight@gmail.com> - 5.9-1
- Cleanup and first attempt at getting 5.9 going though
5.8 hasn't been released yet
* Tue Dec 17 2024 Ron Olson <tachoknight@gmail.com> 5.8.1-6
- Made 5.8.1 work for EPEL 10 as it is the last version of
Swift that could be built without another version of
Swift being present
* Fri Jun 21 2024 Ron Olson <tachoknight@gmail.com> 5.8.1-5
- Added another patch
* Thu Jun 20 2024 Ron Olson <tachoknight@gmail.com> 5.8.1-4
- Added patch to build without pipes on Rawhide and Fedora 41
* Fri Feb 16 2024 Ron Olson <tachoknight@gmail.com> 5.8.1-3
- Added symlink for future versions of Swift
* Tue Aug 22 2023 Ron Olson <tachoknight@gmail.com> 5.8.1-2
- Added patch to work with glibc 2.38
Resolves: rhbz#2226476
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.8.1-1.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 5.8.1-1.1
- Rebuilt for Python 3.12
* Fri Jun 02 2023 Ron Olson <tachoknight@gmail.com> - 5.8.1-1
- Updated to Swift 5.8.1-RELEASE
Resolves: rhbz#2211845
* Fri Mar 31 2023 Ron Olson <tachoknight@gmail.com> - 5.8-1
- Updated to Swift 5.8-RELEASE
Resolves: rhbz#2183429
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.7.2-1.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Dec 27 2022 Ron Olson <tachoknight@gmail.com> - 5.8-1

Loading…
Cancel
Save