swift: fix build against gcc-13

Without the change `swift` build fails on bundled `llvm` on
`staging-next` as:

    In file included from /build/src/llvm-project/llvm/lib/Support/Signals.cpp:14:
    /build/src/llvm-project/llvm/include/llvm/Support/Signals.h:119:24:
        error: unknown type name 'uintptr_t'; did you mean '__intptr_t'?
      void CleanupOnSignal(uintptr_t Context);
                           ^~~~~~~~~
                           __intptr_t

THe change pulls in upstream fix.
This commit is contained in:
Sergei Trofimovich 2024-01-03 19:54:04 +00:00
parent 307002948d
commit e5ec997164

View File

@ -311,6 +311,13 @@ in stdenv.mkDerivation {
sha256 = "1rma1al0rbm3s3ql6bnvbcighp74lri1lcrwbyacgdqp80fgw1b6";
}}
# gcc-13 build fixes
patch -p2 -d llvm-project/llvm -i ${fetchpatch {
name = "gcc-13.patch";
url = "https://github.com/llvm/llvm-project/commit/ff1681ddb303223973653f7f5f3f3435b48a1983.patch";
hash = "sha256-nkRPWx8gNvYr7mlvEUiOAb1rTrf+skCZjAydJVUHrcI=";
}}
${lib.optionalString stdenv.isLinux ''
substituteInPlace llvm-project/clang/lib/Driver/ToolChains/Linux.cpp \
--replace 'SysRoot + "/lib' '"${glibc}/lib" "' \