[commit: ghc] master: aclocal.m4: allow override of dllwrap and windres when cross-compiling (1fd06de)

git at git.haskell.org git at git.haskell.org
Tue May 23 09:31:37 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/1fd06de4e98d1b659500ecd66d88d6d80fcc60d3/ghc

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

commit 1fd06de4e98d1b659500ecd66d88d6d80fcc60d3
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date:   Tue May 23 09:13:43 2017 +0100

    aclocal.m4: allow override of dllwrap and windres when cross-compiling
    
    Commit 66108864540601837ad77847f4062a670362361f reverted ability
    to override 'dllwrap' and 'windres' paths when cross-compiling.
    
    After this change (and a few libraries/Win32 patches) I was able
    to build cross-compiler to windows:
    
        $ ./configure --target=i686-w64-mingw32 \
            DllWrap=i686-w64-mingw32-dllwrap \
            Windres=i686-w64-mingw32-windres
    
    Later both 'dllwrap' and 'windres' should be derived from --target=
    as we do now for 'CC', 'AR', 'NM' and others.
    
    Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>


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

1fd06de4e98d1b659500ecd66d88d6d80fcc60d3
 aclocal.m4 | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index 697cba5..7ad9c36 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -479,8 +479,18 @@ AC_DEFUN([FP_SETTINGS],
         SettingsLdCommand="$LdCmd"
         SettingsArCommand="$ArCmd"
         SettingsPerlCommand="$PerlCmd"
-        SettingsDllWrapCommand="/bin/false"
-        SettingsWindresCommand="/bin/false"
+        if test -z "$DllWrap"
+        then
+            SettingsDllWrapCommand="/bin/false"
+        else
+            SettingsDllWrapCommand="$DllWrap"
+        fi
+        if test -z "$Windres"
+        then
+            SettingsWindresCommand="/bin/false"
+        else
+            SettingsWindresCommand="$Windres"
+        fi
         SettingsLibtoolCommand="libtool"
         SettingsTouchCommand='touch'
     fi



More information about the ghc-commits mailing list