diff --git a/cmake.patch b/cmake.patch index 6e5a113..1a767a1 100644 --- a/cmake.patch +++ b/cmake.patch @@ -10,3 +10,16 @@ index 9d14f6b70f..491f023493 100644 #include #include + +--- cmake.orig/Source/cmake.cxx ++++ cmake/Source/cmake.cxx +@@ -131,7 +131,9 @@ + // NOTE: the __linux__ macro is predefined on Android host too, but + // main CMakeLists.txt filters out this generator by host name. + #if (defined(__linux__) && !defined(__ANDROID__)) || defined(_WIN32) ++#if !defined(CMAKE_BOOTSTRAP) + # include "cmGlobalGhsMultiGenerator.h" ++#endif + #endif + + #if defined(__APPLE__) diff --git a/swift-lang.spec b/swift-lang.spec index b24bf79..92beeef 100644 --- a/swift-lang.spec +++ b/swift-lang.spec @@ -361,6 +361,10 @@ cp %{SOURCE100} swift/utils/fedora-presets.ini %build export VERBOSE=1 +# Workaround for GCC 16 ICE in cmath / riemann_zeta +export CFLAGS="-O2 -g -fno-builtin-logf" +export CXXFLAGS="-O2 -g -fno-builtin-logf" + # Four-stage bootstrap to build Swift from scratch without external Swift compiler # Stage 0: Build minimal Swift toolchain from C++ using gold linker # Produces: Swift compiler with C++ legacy driver (no SwiftPM, no swift-driver)