[commit: ghc] master: Use LDFLAGS when compiling ghc-pwd (2aa7810)

git at git.haskell.org git at git.haskell.org
Thu Mar 27 13:50:15 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/2aa78106ae8f3c9b71d7b85c2a8a5558c4c35fb4/ghc

>---------------------------------------------------------------

commit 2aa78106ae8f3c9b71d7b85c2a8a5558c4c35fb4
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Thu Mar 27 12:34:38 2014 +0000

    Use LDFLAGS when compiling ghc-pwd


>---------------------------------------------------------------

2aa78106ae8f3c9b71d7b85c2a8a5558c4c35fb4
 aclocal.m4 |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/aclocal.m4 b/aclocal.m4
index be38031..5f5c424 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



More information about the ghc-commits mailing list