From d190fa9b04536ab0c74f830493a867cfb29f7bad Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 5 Oct 2018 17:53:41 +0900 Subject: [PATCH] replace %ghc_set_cflags with simplified %ghc_set_gcc_flags tested in ghc.spec in ghc:8.4 module --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 12 ++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2fef7f3..69f7896 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.9.2 +Version: 1.9.3 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -170,6 +170,9 @@ EOF %changelog +* Fri Oct 5 2018 Jens Petersen - 1.9.3-1 +- replace ghc_set_cflags with simplified ghc_set_gcc_flags + * Tue Jul 31 2018 Jens Petersen - 1.9.2-1 - inject a Setup.hs if none shipped diff --git a/macros.ghc b/macros.ghc index 6313c1f..e67ba38 100644 --- a/macros.ghc +++ b/macros.ghc @@ -9,14 +9,10 @@ LANG=en_US.utf8\ # compiler version %ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} -%ghc_set_cflags\ -# -Wunused-label is extremely noisy\ -%ifarch aarch64 s390x\ -CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall //' -e 's/-Werror=format-security //')}"\ -%else\ -CFLAGS="${CFLAGS:-%optflags}"\ -%endif\ -export CFLAGS\ + +%ghc_set_gcc_flags\ +export CFLAGS="${CFLAGS:-%optflags}"\ +export LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"\ %{nil} # configure