diff options
author | Simon Marlow <marlowsd@gmail.com> | 2014-03-27 12:34:38 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2014-03-27 12:37:44 +0000 |
commit | 2aa78106ae8f3c9b71d7b85c2a8a5558c4c35fb4 (patch) | |
tree | b741dd6c9800dc4e390304af238586c1a7a1ee49 /aclocal.m4 | |
parent | d011cdefca7aa66cbcf71c941f38a4e6dd4c5579 (diff) | |
download | haskell-2aa78106ae8f3c9b71d7b85c2a8a5558c4c35fb4.tar.gz |
Use LDFLAGS when compiling ghc-pwd
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index be38031686..5f5c424c78 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1806,7 +1806,13 @@ AC_MSG_NOTICE(Building in-tree ghc-pwd) dnl except we don't want to have to know what make is called. Sigh. rm -rf utils/ghc-pwd/dist-boot mkdir utils/ghc-pwd/dist-boot - if ! "$WithGhc" -v0 -no-user-$GHC_PACKAGE_DB_FLAG -hidir utils/ghc-pwd/dist-boot -odir utils/ghc-pwd/dist-boot -stubdir utils/ghc-pwd/dist-boot --make utils/ghc-pwd/Main.hs -o utils/ghc-pwd/dist-boot/ghc-pwd + dnl If special linker flags are needed to build things, then allow + dnl the user to pass them in via LDFLAGS. + changequote(, )dnl + GHC_LDFLAGS=`echo $LDFLAGS | sed 's/\(^\| \)\([^ ]\)/\1-optl\2/g'` + changequote([, ])dnl + echo $GHC_LDFLAGS + if ! "$WithGhc" $GHC_LDFLAGS -v0 -no-user-$GHC_PACKAGE_DB_FLAG -hidir utils/ghc-pwd/dist-boot -odir utils/ghc-pwd/dist-boot -stubdir utils/ghc-pwd/dist-boot --make utils/ghc-pwd/Main.hs -o utils/ghc-pwd/dist-boot/ghc-pwd then AC_MSG_ERROR([Building ghc-pwd failed]) fi |