From e52be7d0871355f51bcfeb2f06b12f0b963af8d8 Mon Sep 17 00:00:00 2001 From: markeryang Date: Mon, 22 Jul 2024 06:29:01 +0000 Subject: [PATCH] add a workaround for fixing the stdbuf detection issue when building with clang --- coreutils.spec | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/coreutils.spec b/coreutils.spec index e7f3900..52b7b09 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,6 +1,6 @@ Name: coreutils Version: 9.4 -Release: 7 +Release: 8 License: GPLv3+ Summary: A set of basic GNU tools commonly used in shell scripts Url: https://www.gnu.org/software/coreutils/ @@ -84,7 +84,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" @@ -160,6 +168,9 @@ fi %{_mandir}/man*/* %changelog +* Mon Jul 22 2024 yanglongkang - 9.4-8 +- add a workaround for fixing clang building issues + * Tue Jun 25 2024 zhangxianting - 9.4-7 - remove arch judgement at patch that support sw -- Gitee