-Werror=format-security fails without -Wall

This commit is contained in:
Jens Petersen 2017-11-10 12:12:46 +09:00
parent 272d2b048a
commit 3643446b23
2 changed files with 5 additions and 2 deletions

View File

@ -11,7 +11,7 @@
Name: ghc-rpm-macros
Version: 1.6.50
Release: 4%{?dist}
Release: 5%{?dist}
Summary: RPM macros for building Haskell packages for GHC
License: GPLv3+
@ -161,6 +161,9 @@ EOF
%changelog
* Fri Nov 10 2017 Jens Petersen <petersen@redhat.com> - 1.6.50-5
- -Werror=format-security fails without -Wall
* Fri Nov 10 2017 Jens Petersen <petersen@redhat.com> - 1.6.50-4
- do not set -Wall on aarch64 and s390x since -Wunused-label is extremely noisy

View File

@ -28,7 +28,7 @@ fi
%global _hardened_ldflags %{nil}\
# -Wunused-label is extremely noisy\
%ifarch aarch64 s390x\
CFLAGS="${CFLAGS:-$(echo %optflags | sed -e s/-Wall//)}"\
CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall -Werror=format-security //')}"\
%else\
CFLAGS="${CFLAGS:-%optflags}"\
%endif\