summaryrefslogtreecommitdiff
path: root/Build/collect-ghc-options.sh
diff options
context:
space:
mode:
authorJoey Hess <id@joeyh.name>2015-12-15 17:47:59 -0700
committerJoey Hess <id@joeyh.name>2015-12-15 17:47:59 -0700
commit7c12f0ac9224246dac308e837bccb5b2157062ee (patch)
tree0caa943db39f9a2bfad404c547acda354076b46a /Build/collect-ghc-options.sh
downloadgit-repair-7c12f0ac9224246dac308e837bccb5b2157062ee.tar.gz
Import git-repair_1.20151215.orig.tar.xz
[dgit import orig git-repair_1.20151215.orig.tar.xz]
Diffstat (limited to 'Build/collect-ghc-options.sh')
-rwxr-xr-xBuild/collect-ghc-options.sh12
1 files changed, 12 insertions, 0 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