!30 Support build with clang

From: @luofeng14 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
This commit is contained in:
openeuler-ci-bot 2023-11-09 06:38:47 +00:00 committed by Gitee
commit c37265354c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,6 +1,6 @@
Name: gmp
Version: 6.2.1
Release: 2
Release: 3
Epoch: 1
URL: https://gmplib.org
Source0: https://gmplib.org/download/gmp/gmp-%{version}.tar.bz2
@ -36,7 +36,11 @@ GMP dependent library for C++ applications.
%build
autoreconf -ifv
if as --help | grep -q execstack; then
export CCAS="gcc -c -Wa,--noexecstack"
%if "%toolchain" == "clang"
export CCAS="clang -c -Wa,--noexecstack"
%else
export CCAS="gcc -c -Wa,--noexecstack"
%endif
fi
%ifarch %{ix86}
@ -97,6 +101,9 @@ make %{?_smp_mflags} check
%{_libdir}/pkgconfig/gmpxx.pc
%changelog
* Mon Nov 6 2023 luofeng <luofeng13@huawei.com> 6.2.1-3
- Support build with clang
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 6.2.1-2
- DESC: delete -S git from %autosetup, and delete BuildRequires git