From 91d54669b7c63d3e4038e4c6a8d34ff020f51e6c Mon Sep 17 00:00:00 2001 From: jchzhou Date: Thu, 11 Jul 2024 09:36:21 +0800 Subject: [PATCH] add a workaround for fixing the stdbuf detection issue when building with clang Signed-off-by: jchzhou (cherry picked from commit 4787c1b0d7d83bd3716ce8b1ea414a2863149c6b) --- coreutils.spec | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/coreutils.spec b/coreutils.spec index 3c97cca..9c04a66 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,6 +1,6 @@ Name: coreutils Version: 9.4 -Release: 6 +Release: 7 License: GPLv3+ Summary: A set of basic GNU tools commonly used in shell scripts Url: https://www.gnu.org/software/coreutils/ @@ -87,7 +87,15 @@ autoreconf -fiv if [ %user = root ]; then export FORCE_UNSAFE_CONFIGURE=1 fi -export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fpic -fsigned-char" +CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fpic -fsigned-char" + +# add -Wno-unused-command-line-argument when building with clang +# as a workaround for stdbuf detection faliure during configuring +%if "%{?toolchain}" == "clang" +CFLAGS="$CFLAGS -Wno-unused-command-line-argument" +%endif + +export CFLAGS # make mknod work again in chroot without /proc being mounted export ac_cv_func_lchmod="no" @@ -163,6 +171,9 @@ fi %{_mandir}/man*/* %changelog +* Thu Jul 11 2024 jchzhou - 9.4-7 +- add a workaround for fixing clang building issues + * Mon Jun 24 2024 huyubiao - 9.4-6 - backport patches from community -- Gitee