[commit: ghc] ghc-7.8: Use LDFLAGS when compiling ghc-pwd (636f550)

git at git.haskell.org git at git.haskell.org
Mon Apr 14 13:53:28 UTC 2014


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

On branch  : ghc-7.8
Link       : http://ghc.haskell.org/trac/ghc/changeset/636f5500722e2a1b0f8c764e85d7a2b51ec3f25f/ghc

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

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

    Use LDFLAGS when compiling ghc-pwd
    
    (cherry picked from commit 2aa78106ae8f3c9b71d7b85c2a8a5558c4c35fb4)


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

636f5500722e2a1b0f8c764e85d7a2b51ec3f25f
 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