From 7f9b2c0af12bc6df1745e77a41cedc1f7f2722fe Mon Sep 17 00:00:00 2001 From: Ruoqing He Date: Fri, 25 Apr 2025 11:03:43 +0000 Subject: [PATCH] ci: Enable `install_libseccomp.sh` for riscv64 `musl` target is not yet available for riscv64 as of 1.80.0 rust toolchain, set `FORTIFY_SOURCE` to 1 on riscv64 platforms. Signed-off-by: Ruoqing He --- ci/install_libseccomp.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ci/install_libseccomp.sh b/ci/install_libseccomp.sh index a18ce72686..4bcc618592 100755 --- a/ci/install_libseccomp.sh +++ b/ci/install_libseccomp.sh @@ -44,9 +44,11 @@ fi gperf_tarball="gperf-${gperf_version}.tar.gz" gperf_tarball_url="${gperf_url}/${gperf_tarball}" -# We need to build the libseccomp library from sources to create a static library for the musl libc. -# However, ppc64le and s390x have no musl targets in Rust. Hence, we do not set cflags for the musl libc. -if [[ "${arch}" != "ppc64le" ]] && [[ "${arch}" != "s390x" ]]; then +# We need to build the libseccomp library from sources to create a static +# library for the musl libc. +# However, ppc64le, riscv64 and s390x have no musl targets in Rust. Hence, we do +# not set cflags for the musl libc. +if [[ "${arch}" != "ppc64le" ]] && [[ "${arch}" != "riscv64" ]] && [[ "${arch}" != "s390x" ]]; then # Set FORTIFY_SOURCE=1 because the musl-libc does not have some functions about FORTIFY_SOURCE=2 cflags="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2" fi