!18 add clang compile support

From: @liyunfei33 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
This commit is contained in:
openeuler-ci-bot 2024-02-27 09:31:05 +00:00 committed by Gitee
commit cc8792a3fd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,6 +1,6 @@
Name: autogen
Version: 5.18.16
Release: 3
Release: 4
License: GPLv2+ and GPLv3+
Summary: Automated text file generator
URL: http://www.gnu.org/software/autogen/
@ -45,8 +45,13 @@ Man pages and other related documents.
%build
# Static libraries are needed to run test-suite.
export CFLAGS="$RPM_OPT_FLAGS -Wno-implicit-fallthrough -Wno-format-overflow \
CFLAGS="$RPM_OPT_FLAGS -Wno-implicit-fallthrough -Wno-format-overflow \
-Wno-format-truncation"
%if "%toolchain" == "clang"
CFLAGS+=" -Wno-missing-field-initializers -Wno-format "
%endif
export CFLAGS
%configure
# Omit unused direct shared library dependencies.
@ -104,6 +109,9 @@ echo "%{_libdir}" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%exclude %{_infodir}/dir
%changelog
* Thu Feb 1 2024 liyunfei<liyunfei33@huawei.com> - 5.18.16-4
- add additional warning options for clang
* Tue Oct 18 2022 zhangruifang <zhangruifang1@h-partners.com> - 5.18.16-3
- fix stray blanking of config file char