From 7b029b9a5316bac78fce24876cdae3fb9abddbaa Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 19 Aug 2015 13:53:57 -0400 Subject: Makefile: Pass LDFLAGS, CFLAGS, and CPPFLAGS through ghc and on to ld, cc, and cpp. As a result of the Makefile changes, the Debian package is built with various hardening options. Although their benefit to a largely haskell program is unknown. --- Build/collect-ghc-options.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 Build/collect-ghc-options.sh (limited to 'Build/collect-ghc-options.sh') diff --git a/Build/collect-ghc-options.sh b/Build/collect-ghc-options.sh new file mode 100755 index 000000000..4f75a7202 --- /dev/null +++ b/Build/collect-ghc-options.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Generate --ghc-options to pass LDFLAGS, CFLAGS, and CPPFLAGS through ghc +# and on to ld, cc, and cpp. +for w in $LDFLAGS; do + printf -- "-optl%s\n" "$w" +done +for w in $CFLAGS; do + printf -- "-optc%s\n" "$w" +done +for w in $CPPFLAGS; do + printf -- "-optc-Wp,%s\n" "$w" +done -- cgit v1.2.3