add a workaround for fixing the stdbuf detection issue when building with clang

Signed-off-by: jchzhou <zhoujiacheng@iscas.ac.cn>
(cherry picked from commit 4787c1b0d7d83bd3716ce8b1ea414a2863149c6b)
This commit is contained in:
jchzhou 2024-07-11 09:36:21 +08:00 committed by openeuler-sync-bot
parent 81797cde55
commit 91d54669b7

View File

@ -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 <zhoujiacheng@iscas.ac.cn> - 9.4-7
- add a workaround for fixing clang building issues
* Mon Jun 24 2024 huyubiao <huyubiao@huawei.com> - 9.4-6
- backport patches from community