From 8f5e4f020e79ec1fd1e8540bdea3c1c20030405b Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 19 Jun 2026 00:17:50 +0200 Subject: [PATCH] GHA: fix Linux triplet passed to `CMAKE_C_COMPILER_TARGET` Before this patch it broke clang 20/21 cmake builds on ubuntu-26.04-arm runner, failing at the beginning of the configure stage while probing the compiler. Seen in the 'CM openssl clang krb5 LTO' job: ``` : && /usr/bin/clang --target=aarch64-pc-linux-gnu CMakeFiles/cmTC_3d9ae.dir/testCCompiler.c.o -o cmTC_3d9ae && : /usr/bin/aarch64-linux-gnu-ld.bfd: cannot find crtbeginS.o: No such file or directory /usr/bin/aarch64-linux-gnu-ld.bfd: cannot find -lgcc: No such file or directory /usr/bin/aarch64-linux-gnu-ld.bfd: cannot find -lgcc_s: No such file or directory ``` Ref: https://github.com/curl/curl/actions/runs/27778098314/job/82195462687#step:38:66 Follow-up to 36bd8074758a0b3a784403eb3d2cc31d240de896 #15242 Follow-up to 232302f88a152a1d1722da9f69c383a766528918 #14382 Cherry-picked from #22092 Closes #22097 --- .github/workflows/http3-linux.yml | 2 +- .github/workflows/linux.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/http3-linux.yml b/.github/workflows/http3-linux.yml index 2909203e16..a95a11316e 100644 --- a/.github/workflows/http3-linux.yml +++ b/.github/workflows/http3-linux.yml @@ -789,7 +789,7 @@ jobs: if [ "${MATRIX_BUILD}" = 'cmake' ]; then [[ "${MATRIX_GENERATE}" = *'boringssl'* ]] && options=" -DBORINGSSL_VERSION=${BORINGSSL_VERSION}" cmake -B bld -G Ninja \ - -DCMAKE_C_COMPILER_TARGET="$(uname -m)-pc-linux-gnu" -DBUILD_STATIC_LIBS=ON \ + -DCMAKE_C_COMPILER_TARGET="$(uname -m)-linux-gnu" -DBUILD_STATIC_LIBS=ON \ -DCURL_WERROR=ON -DENABLE_DEBUG=ON \ -DCURL_USE_LIBUV=ON -DCURL_ENABLE_NTLM=ON \ -DTEST_NGHTTPX=/home/runner/nghttp2/build/bin/nghttpx \ diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 8cb02dec24..6b520ec41f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -866,7 +866,7 @@ jobs: if [ "${MATRIX_BUILD}" = 'cmake' ]; then cmake -B bld -G Ninja \ -DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \ - -DCMAKE_C_COMPILER_TARGET="$(uname -m)-pc-linux-gnu" -DBUILD_STATIC_LIBS=ON \ + -DCMAKE_C_COMPILER_TARGET="$(uname -m)-linux-gnu" -DBUILD_STATIC_LIBS=ON \ -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON \ ${MATRIX_GENERATE} else