Add conditionals for the CFLAGS that only the GCC compiler support

This commit is contained in:
SaltyFruit 2023-08-28 05:41:13 +00:00
parent 9ba48db609
commit f05e215e36

View File

@ -6,7 +6,7 @@
Name: dovecot
Version: 2.3.20
Release: 1
Release: 2
Summary: Dovecot Secure imap server
License: MIT and LGPLv2.1
URL: http://www.dovecot.org/
@ -84,7 +84,11 @@ echo "testsuite" >dovecot-2.3-pigeonhole-%{pigeonholever}/run-test-valgrind.excl
sed -i '/DEFAULT_INCLUDES *=/s|$| '"$(pkg-config --cflags libclucene-core)|" src/plugins/fts-lucene/Makefile.in
%build
export CFLAGS="%{__global_cflags} -fno-strict-aliasing -fstack-reuse=none" LDFLAGS="-Wl,-z,now -Wl,-z,relro %{?__global_ldflags}"
export CFLAGS="%{__global_cflags} -fno-strict-aliasing" LDFLAGS="-Wl,-z,now -Wl,-z,relro %{?__global_ldflags}"
%if "%toolchain" == "gcc"
CFLAGS="$CFLAGS -fstack-reuse=none"
export CFLAGS
%endif
mkdir -p m4
autoreconf -I . -fiv #required for aarch64 support
@ -311,6 +315,9 @@ make check
%changelog
* Thu Aug 24 2023 Xiaoya Huang <huangxiaoya@iscas.ac.cn> - 1:2.3.20-2
- Add conditionals for the CFLAGS that only the GCC compiler support
* Fri Apr 07 2023 yaoxin <yao_xin001@hoperun.com> - 1:2.3.20-1
- Update to 2.3.20