Disable format-security and missing-format-attribute warnings via CFLAGS on

pre-11.2 systems.

OBS-URL: https://build.opensuse.org/package/show/server:mail/exim?expand=0&rev=118
This commit is contained in:
Lars Müller 2012-03-17 20:08:07 +00:00 committed by Git OBS Bridge
parent 4019175057
commit bedf5a3bc8
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sat Mar 17 19:42:30 UTC 2012 - lars@samba.org
- Disable format-security and missing-format-attribute warnings via CFLAGS on
pre-11.2 systems.
-------------------------------------------------------------------
Wed Mar 7 16:13:51 UTC 2012 - lars@samba.org

View File

@ -16,6 +16,7 @@
#
Name: exim
BuildRequires: db-devel
BuildRequires: openldap2-devel
@ -125,6 +126,9 @@ once, if at all. The rest is done by logrotate / cron.)
fPIE="-fPIE"
pie="-pie"
%endif
%if %{?suse_version:%suse_version}%{?!suse_version:99999} > 1100
CFALGS_OPT_WERROR="-Werror=format-security -Werror=missing-format-attribute"
%endif
cat <<-EOF > Local/Makefile
# see src/EDITME for comments.
BIN_DIRECTORY=/usr/sbin
@ -231,7 +235,7 @@ cat <<-EOF > Local/Makefile
# SPOOL_MODE=0640
SUPPORT_MOVE_FROZEN_MESSAGES=yes
HAVE_IPV6=YES
CFLAGS=$RPM_OPT_FLAGS -Wall -Werror=format-security -Werror=missing-format-attribute -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLDAP_DEPRECATED $fPIE
CFLAGS=$RPM_OPT_FLAGS -Wall $CFALGS_OPT_WERROR -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLDAP_DEPRECATED $fPIE
EXTRALIBS=-ldl -L/usr/X11R6/%{_lib} $pie
EOF
touch Local/eximon.conf