mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-22 05:23:01 -04:00
dev-lang/swift: drop 6.2, 6.2.1, 6.2.2, 6.2.3
Signed-off-by: Itai Ferber <itai@itaiferber.net>
This commit is contained in:
@@ -1 +0,0 @@
|
||||
swift-6.2
|
||||
@@ -0,0 +1,15 @@
|
||||
# The Swift backtracer needs to get CPU context information when producing
|
||||
# backtraces, which is necessarily written in assembly. Because it tries to be
|
||||
# portable, it doesn't include a note indicating that the assembled binary
|
||||
# doesn't require an executable stack; we need to include one explicitly to turn
|
||||
# it off.
|
||||
|
||||
--- a/swift/stdlib/public/RuntimeModule/get-cpu-context.S
|
||||
+++ b/swift/stdlib/public/RuntimeModule/get-cpu-context.S
|
||||
@@ -140,3 +140,6 @@ FN(_swift_get_cpu_context):
|
||||
bx lr
|
||||
#endif
|
||||
|
||||
+#if defined(__linux__) && defined(__ELF__)
|
||||
+.section .note.GNU-stack,"",%progbits
|
||||
+#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
# Packages should not have `-Werror` unconditionally enabled.
|
||||
|
||||
--- a/swift-corelibs-libdispatch/cmake/modules/DispatchCompilerWarnings.cmake
|
||||
+++ b/swift-corelibs-libdispatch/cmake/modules/DispatchCompilerWarnings.cmake
|
||||
@@ -6,7 +6,6 @@ elseif(WIN32)
|
||||
# so that we can use __popcnt64
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-fms-extensions>)
|
||||
else()
|
||||
- add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-Werror>)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-Wall>)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-Wextra>)
|
||||
@@ -0,0 +1,96 @@
|
||||
From: Pavel Sobolev <contact@paveloom.dev>
|
||||
Subject: [PATCH] Fix issues caused by build system updates.
|
||||
|
||||
This includes fixes for issues caused by the following updates:
|
||||
|
||||
- GCC 15 (specifically, changes in libstdc++)
|
||||
- GNU libc C library 2.42
|
||||
|
||||
Specifically, the following is changed:
|
||||
|
||||
- Added missing includes of the `<cstdint>` header [1]
|
||||
- Removed deprecated `struct termio` [2]
|
||||
- Removed a redundant include of the `<math.h>` header [3]
|
||||
|
||||
[1] See https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3a817a4a5a6d94da9127af3be9f84a74e3076ee2
|
||||
[2] See https://github.com/swiftlang/llvm-project/commit/59978b21ad9c65276ee8e14f26759691b8a65763
|
||||
[3] See https://github.com/swiftlang/swift/issues/81774
|
||||
|
||||
Bug: https://bugs.gentoo.org/945025
|
||||
|
||||
Signed-off-by: Pavel Sobolev <contact@paveloom.dev>
|
||||
|
||||
--- a/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
|
||||
+++ b/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
|
||||
@@ -338,17 +338,9 @@ static void ioctl_table_fill() {
|
||||
_(SOUND_PCM_WRITE_CHANNELS, WRITE, sizeof(int));
|
||||
_(SOUND_PCM_WRITE_FILTER, WRITE, sizeof(int));
|
||||
_(TCFLSH, NONE, 0);
|
||||
-#if SANITIZER_GLIBC
|
||||
- _(TCGETA, WRITE, struct_termio_sz);
|
||||
-#endif
|
||||
_(TCGETS, WRITE, struct_termios_sz);
|
||||
_(TCSBRK, NONE, 0);
|
||||
_(TCSBRKP, NONE, 0);
|
||||
-#if SANITIZER_GLIBC
|
||||
- _(TCSETA, READ, struct_termio_sz);
|
||||
- _(TCSETAF, READ, struct_termio_sz);
|
||||
- _(TCSETAW, READ, struct_termio_sz);
|
||||
-#endif
|
||||
_(TCSETS, READ, struct_termios_sz);
|
||||
_(TCSETSF, READ, struct_termios_sz);
|
||||
_(TCSETSW, READ, struct_termios_sz);
|
||||
--- a/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
|
||||
+++ b/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
|
||||
@@ -479,9 +479,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
|
||||
unsigned struct_input_id_sz = sizeof(struct input_id);
|
||||
unsigned struct_mtpos_sz = sizeof(struct mtpos);
|
||||
unsigned struct_rtentry_sz = sizeof(struct rtentry);
|
||||
-#if SANITIZER_GLIBC || SANITIZER_ANDROID
|
||||
- unsigned struct_termio_sz = sizeof(struct termio);
|
||||
-#endif
|
||||
unsigned struct_vt_consize_sz = sizeof(struct vt_consize);
|
||||
unsigned struct_vt_sizes_sz = sizeof(struct vt_sizes);
|
||||
unsigned struct_vt_stat_sz = sizeof(struct vt_stat);
|
||||
--- a/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
|
||||
+++ b/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
|
||||
@@ -1013,7 +1013,6 @@ extern unsigned struct_hd_geometry_sz;
|
||||
extern unsigned struct_input_absinfo_sz;
|
||||
extern unsigned struct_input_id_sz;
|
||||
extern unsigned struct_mtpos_sz;
|
||||
-extern unsigned struct_termio_sz;
|
||||
extern unsigned struct_vt_consize_sz;
|
||||
extern unsigned struct_vt_sizes_sz;
|
||||
extern unsigned struct_vt_stat_sz;
|
||||
--- a/swift/lib/AST/FunctionRefInfo.cpp
|
||||
+++ b/swift/lib/AST/FunctionRefInfo.cpp
|
||||
@@ -14,6 +14,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
+#include <cstdint>
|
||||
#include "swift/AST/FunctionRefInfo.h"
|
||||
#include "swift/AST/DeclNameLoc.h"
|
||||
#include "swift/AST/Identifier.h"/// itself is available in wasi-libc, but it's just a stub that doesn't actually
|
||||
--- a/swift/stdlib/include/llvm/ADT/SmallVector.h
|
||||
+++ b/swift/stdlib/include/llvm/ADT/SmallVector.h
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
+#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
#include <initializer_list>
|
||||
--- a/swift-foundation/Sources/_FoundationCShims/include/_CStdlib.h
|
||||
+++ b/swift-foundation/Sources/_FoundationCShims/include/_CStdlib.h
|
||||
@@ -51,10 +51,6 @@
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
-#if __has_include(<math.h>)
|
||||
-#include <math.h>
|
||||
-#endif
|
||||
-
|
||||
#if __has_include(<signal.h>)
|
||||
/// Guard against including `signal.h` on WASI. The `signal.h` header file
|
||||
1
dev-lang/swift/files/swift-6.2.4/gentoo.ini
Symbolic link
1
dev-lang/swift/files/swift-6.2.4/gentoo.ini
Symbolic link
@@ -0,0 +1 @@
|
||||
../swift-6.1.3/gentoo.ini
|
||||
183
dev-lang/swift/files/swift-6.2.4/link-ncurses-tinfo.patch
Normal file
183
dev-lang/swift/files/swift-6.2.4/link-ncurses-tinfo.patch
Normal file
@@ -0,0 +1,183 @@
|
||||
# Various Swift components require linking against `curses`; Gentoo doesn't use
|
||||
# `curses` as an alias for `ncurses`, so we have to link against `ncurses`
|
||||
# explicitly. `ncurses` on Gentoo also doesn't expose the `curses` terminfo
|
||||
# database interface (e.g., `set_curterm`, `del_curterm`, etc.), so we have to
|
||||
# also explicitly link against `tinfo`.
|
||||
|
||||
--- a/swift/utils/test-clustered-bit-vector/Makefile
|
||||
+++ b/swift/utils/test-clustered-bit-vector/Makefile
|
||||
@@ -5,7 +5,7 @@ HEADERS=${SRCROOT}/tools/swift/include/swift/Basic/ClusteredBitVector.h
|
||||
SOURCES=${SRCROOT}/tools/swift/lib/Basic/ClusteredBitVector.cpp
|
||||
|
||||
generator: generator.cpp ${HEADERS} ${SOURCES}
|
||||
- xcrun clang++ -std=c++11 -stdlib=libc++ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I${OBJROOT}/include -I${SRCROOT}/include -I${SRCROOT}/tools/swift/include -L${OBJROOT}/lib -lLLVMSupport -lcurses generator.cpp ${SOURCES} -o generator
|
||||
+ xcrun clang++ -std=c++11 -stdlib=libc++ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I${OBJROOT}/include -I${SRCROOT}/include -I${SRCROOT}/tools/swift/include -L${OBJROOT}/lib -lLLVMSupport -lncurses -ltinfo generator.cpp ${SOURCES} -o generator
|
||||
|
||||
test: test.cpp ${HEADERS} ${SOURCES}
|
||||
- xcrun clang++ -g -std=c++11 -stdlib=libc++ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I${OBJROOT}/include -I${SRCROOT}/include -I${SRCROOT}/tools/swift/include -L${OBJROOT}/lib -lLLVMSupport -lcurses test.cpp ${SOURCES} -o test
|
||||
+ xcrun clang++ -g -std=c++11 -stdlib=libc++ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I${OBJROOT}/include -I${SRCROOT}/include -I${SRCROOT}/tools/swift/include -L${OBJROOT}/lib -lLLVMSupport -lncurses -ltinfo test.cpp ${SOURCES} -o test
|
||||
--- a/swift/utils/test-prefix-map/Makefile
|
||||
+++ b/swift/utils/test-prefix-map/Makefile
|
||||
@@ -11,7 +11,7 @@ CXXFLAGS = -std=c++11 \
|
||||
-I$(objroot)/tools/clang/include \
|
||||
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
|
||||
|
||||
-LDFLAGS = -L$(objroot)/lib -lswiftBasic -lLLVMSupport -lcurses
|
||||
+LDFLAGS = -L$(objroot)/lib -lswiftBasic -lLLVMSupport -lncurses -ltinfo
|
||||
|
||||
main: main.cpp $(srcroot)/tools/swift/include/swift/Basic/PrefixMap.h
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o main main.cpp
|
||||
--- a/swift/utils/test-successor-map/Makefile
|
||||
+++ b/swift/utils/test-successor-map/Makefile
|
||||
@@ -11,7 +11,7 @@ CXXFLAGS = -std=c++11 \
|
||||
-I$(objroot)/tools/clang/include \
|
||||
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
|
||||
|
||||
-LDFLAGS = -L$(objroot)/Debug+Asserts/lib -lLLVMSupport -lcurses
|
||||
+LDFLAGS = -L$(objroot)/Debug+Asserts/lib -lLLVMSupport -lncurses -ltinfo
|
||||
|
||||
main: main.cpp $(srcroot)/tools/swift/include/swift/Basic/SuccessorMap.h
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o main main.cpp
|
||||
--- a/llbuild/Package.swift
|
||||
+++ b/llbuild/Package.swift
|
||||
@@ -31,7 +31,10 @@ let terminfoLibraries: [LinkerSetting] = {
|
||||
#if os(FreeBSD) || os(OpenBSD)
|
||||
return [.linkedLibrary("ncurses")]
|
||||
#else
|
||||
- return [.linkedLibrary("ncurses", .when(platforms: [.linux, .macOS]))]
|
||||
+ return [
|
||||
+ .linkedLibrary("ncurses", .when(platforms: [.linux, .macOS])),
|
||||
+ .linkedLibrary("tinfo", .when(platforms: [.linux]))
|
||||
+ ]
|
||||
#endif
|
||||
}()
|
||||
|
||||
--- a/llbuild/lib/llvm/Support/CMakeLists.txt
|
||||
+++ b/llbuild/lib/llvm/Support/CMakeLists.txt
|
||||
@@ -65,7 +65,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|OpenBSD")
|
||||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Android|Darwin|Linux|FreeBSD")
|
||||
- target_link_libraries(llvmSupport PRIVATE curses)
|
||||
+ target_link_libraries(llvmSupport PRIVATE ncurses tinfo)
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL APPEND PROPERTY LLBuild_EXPORTS llvmSupport)
|
||||
--- a/llbuild/perftests/Xcode/PerfTests/CMakeLists.txt
|
||||
+++ b/llbuild/perftests/Xcode/PerfTests/CMakeLists.txt
|
||||
@@ -33,7 +33,8 @@ target_link_libraries(XcodePerfTests PRIVATE
|
||||
llbuildNinja
|
||||
llbuildBuildSystem
|
||||
llbuildCommands
|
||||
- curses
|
||||
+ ncurses
|
||||
+ tinfo
|
||||
SQLite::SQLite3
|
||||
"${MACOSX_SDK_PATH}/System/Library/Frameworks/Foundation.framework"
|
||||
"${MACOSX_PLATFORM_PATH}/Developer/Library/Frameworks/XCTest.framework"
|
||||
--- a/llbuild/products/libllbuild/CMakeLists.txt
|
||||
+++ b/llbuild/products/libllbuild/CMakeLists.txt
|
||||
@@ -28,7 +28,7 @@ endif()
|
||||
|
||||
if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
|
||||
target_link_libraries(libllbuild PRIVATE
|
||||
- curses)
|
||||
+ ncurses tinfo)
|
||||
endif()
|
||||
|
||||
target_include_directories(libllbuild
|
||||
@@ -80,7 +80,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
llbuildNinja
|
||||
llvmSupport
|
||||
SQLite::SQLite3
|
||||
- curses)
|
||||
+ ncurses tinfo)
|
||||
|
||||
# Manually set up the remaining framework structure.
|
||||
set(LLBUILD_FW_INPUTS)
|
||||
--- a/llbuild/products/llbuild/CMakeLists.txt
|
||||
+++ b/llbuild/products/llbuild/CMakeLists.txt
|
||||
@@ -16,5 +16,5 @@ endif()
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
target_link_libraries(llbuild PRIVATE
|
||||
- curses)
|
||||
+ ncurses tinfo)
|
||||
endif()
|
||||
--- a/llbuild/products/swift-build-tool/CMakeLists.txt
|
||||
+++ b/llbuild/products/swift-build-tool/CMakeLists.txt
|
||||
@@ -10,7 +10,7 @@ target_link_libraries(swift-build-tool PRIVATE
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
target_link_libraries(swift-build-tool PRIVATE
|
||||
- curses)
|
||||
+ ncurses tinfo)
|
||||
endif()
|
||||
|
||||
install(TARGETS swift-build-tool
|
||||
--- a/llbuild/tests/lit.site.cfg.in
|
||||
+++ b/llbuild/tests/lit.site.cfg.in
|
||||
@@ -21,7 +21,7 @@ config.sqlite_library = "@SQLite3_LIBRARY@"
|
||||
if sys.platform == 'Windows':
|
||||
config.curses_library = ''
|
||||
else:
|
||||
- config.curses_library = '-lcurses'
|
||||
+ config.curses_library = '-lncurses -ltinfo'
|
||||
config.threads_library = "@CMAKE_THREAD_LIBS_INIT@"
|
||||
if "@CMAKE_DL_LIBS@":
|
||||
config.dl_library = "-l@CMAKE_DL_LIBS@"
|
||||
--- a/llbuild/unittests/Basic/CMakeLists.txt
|
||||
+++ b/llbuild/unittests/Basic/CMakeLists.txt
|
||||
@@ -14,5 +14,5 @@ target_link_libraries(BasicTests PRIVATE
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
target_link_libraries(BasicTests PRIVATE
|
||||
- curses)
|
||||
+ ncurses tinfo)
|
||||
endif()
|
||||
--- a/llbuild/unittests/BuildSystem/CMakeLists.txt
|
||||
+++ b/llbuild/unittests/BuildSystem/CMakeLists.txt
|
||||
@@ -16,5 +16,5 @@ target_link_libraries(BuildSystemTests PRIVATE
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
target_link_libraries(BuildSystemTests PRIVATE
|
||||
- curses)
|
||||
+ ncurses tinfo)
|
||||
endif()
|
||||
--- a/llbuild/unittests/CAPI/CMakeLists.txt
|
||||
+++ b/llbuild/unittests/CAPI/CMakeLists.txt
|
||||
@@ -15,5 +15,5 @@ target_link_libraries(CAPITests PRIVATE
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
target_link_libraries(CAPITests PRIVATE
|
||||
- curses)
|
||||
+ ncurses tinfo)
|
||||
endif()
|
||||
--- a/llbuild/unittests/Core/CMakeLists.txt
|
||||
+++ b/llbuild/unittests/Core/CMakeLists.txt
|
||||
@@ -15,6 +15,6 @@ target_link_libraries(CoreTests PRIVATE
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
target_link_libraries(CoreTests PRIVATE
|
||||
- curses)
|
||||
+ ncurses tinfo)
|
||||
endif()
|
||||
|
||||
--- a/llbuild/unittests/Ninja/CMakeLists.txt
|
||||
+++ b/llbuild/unittests/Ninja/CMakeLists.txt
|
||||
@@ -8,5 +8,5 @@ target_link_libraries(NinjaTests PRIVATE
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
target_link_libraries(NinjaTests PRIVATE
|
||||
- curses)
|
||||
+ ncurses tinfo)
|
||||
endif()
|
||||
--- a/llbuild/utils/adjust-times/CMakeLists.txt
|
||||
+++ b/llbuild/utils/adjust-times/CMakeLists.txt
|
||||
@@ -7,5 +7,5 @@ target_link_libraries(adjust-times PRIVATE llvmSupport)
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
target_link_libraries(adjust-times PRIVATE
|
||||
- curses)
|
||||
+ ncurses tinfo)
|
||||
endif()
|
||||
15
dev-lang/swift/files/swift-6.2.4/link-with-lld.patch
Normal file
15
dev-lang/swift/files/swift-6.2.4/link-with-lld.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
# Swift defaults to building with `gold` on Linux because `bfd` can't correctly
|
||||
# handle Swift symbols; Gentoo no longer supports `gold`, so we have to make
|
||||
# sure that we build with `lld`.
|
||||
|
||||
--- a/swift/lib/Driver/UnixToolChains.cpp
|
||||
+++ b/swift/lib/Driver/UnixToolChains.cpp
|
||||
@@ -88,7 +88,7 @@ ToolChain::InvocationInfo toolchains::GenericUnix::constructInvocation(
|
||||
}
|
||||
|
||||
std::string toolchains::GenericUnix::getDefaultLinker() const {
|
||||
- return "";
|
||||
+ return "lld";
|
||||
}
|
||||
|
||||
bool toolchains::GenericUnix::addRuntimeRPath(const llvm::Triple &T,
|
||||
1
dev-lang/swift/files/swift-6.2.4/respect-c-cxx-flags.patch
Symbolic link
1
dev-lang/swift/files/swift-6.2.4/respect-c-cxx-flags.patch
Symbolic link
@@ -0,0 +1 @@
|
||||
../swift-6.1.3/respect-c-cxx-flags.patch
|
||||
Reference in New Issue
Block a user