summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2015-08-19 14:00:57 -0400
committerJoey Hess <joeyh@joeyh.name>2015-08-19 14:00:57 -0400
commitb17cedb205501f03d0ad50c278c5d4d57d369a7c (patch)
treef7e165d9bb3ea79c9134522debfbc527fe169be2
parent9fc6d08fad8c7046ecc163607b9d213032aaf56a (diff)
downloadgit-repair-b17cedb205501f03d0ad50c278c5d4d57d369a7c.tar.gz
merge hardneing flags and lintian rpath ignore from git-annex
-rwxr-xr-xBuild/collect-ghc-options.sh12
-rw-r--r--Makefile2
-rw-r--r--git-repair.cabal2
3 files changed, 14 insertions, 2 deletions
diff --git a/Build/collect-ghc-options.sh b/Build/collect-ghc-options.sh
new file mode 100755
index 0000000..4f75a72
--- /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
diff --git a/Makefile b/Makefile
index 42848b7..dcdcbbb 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ build: Build/SysConfig.hs
Build/SysConfig.hs: configure.hs Build/TestConfig.hs Build/Configure.hs
if [ "$(CABAL)" = ./Setup ]; then ghc --make Setup; fi
- $(CABAL) configure
+ $(CABAL) configure --ghc-options="$(shell Build/collect-ghc-options.sh)"
install: build
install -d $(DESTDIR)$(PREFIX)/bin
diff --git a/git-repair.cabal b/git-repair.cabal
index 457fae2..7bd3923 100644
--- a/git-repair.cabal
+++ b/git-repair.cabal
@@ -1,5 +1,5 @@
Name: git-repair
-Version: 1.20150106
+Version: 1.20150107
Cabal-Version: >= 1.8
License: GPL
Maintainer: Joey Hess <joey@kitenet.net>