Support build with clang

Signed-off-by: luofeng14 <luofeng13@huawei.com>
This commit is contained in:
luofeng14 2023-11-06 11:41:47 +00:00 committed by Gitee
parent 83c6cba909
commit 318c4ef2ec
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,6 +1,6 @@
Name: gmp Name: gmp
Version: 6.2.1 Version: 6.2.1
Release: 2 Release: 3
Epoch: 1 Epoch: 1
URL: https://gmplib.org URL: https://gmplib.org
Source0: https://gmplib.org/download/gmp/gmp-%{version}.tar.bz2 Source0: https://gmplib.org/download/gmp/gmp-%{version}.tar.bz2
@ -36,7 +36,11 @@ GMP dependent library for C++ applications.
%build %build
autoreconf -ifv autoreconf -ifv
if as --help | grep -q execstack; then 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 fi
%ifarch %{ix86} %ifarch %{ix86}
@ -97,6 +101,9 @@ make %{?_smp_mflags} check
%{_libdir}/pkgconfig/gmpxx.pc %{_libdir}/pkgconfig/gmpxx.pc
%changelog %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 * Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 6.2.1-2
- DESC: delete -S git from %autosetup, and delete BuildRequires git - DESC: delete -S git from %autosetup, and delete BuildRequires git