[Git][ghc/ghc][wip/hadrian-windows-bindist] 4 commits: wip

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Tue Aug 15 09:29:56 UTC 2023



Matthew Pickering pushed to branch wip/hadrian-windows-bindist at Glasgow Haskell Compiler / GHC


Commits:
6a8bddaf by Matthew Pickering at 2023-08-14T17:10:37+01:00
wip

- - - - -
65158b53 by Matthew Pickering at 2023-08-14T17:33:53+01:00
fix paths

- - - - -
187aa816 by Matthew Pickering at 2023-08-14T17:51:00+01:00
fix paths

- - - - -
9339bffd by Matthew Pickering at 2023-08-15T10:29:48+01:00
Move relocatable build check

- - - - -


5 changed files:

- configure.ac
- distrib/configure.ac.in
- hadrian/bindist/config.mk.in
- hadrian/src/Rules/BinaryDist.hs
- m4/fp_settings.m4


Changes:

=====================================
configure.ac
=====================================
@@ -326,7 +326,7 @@ FP_FIND_ROOT
 # Extract and configure the Windows toolchain
 if test "$HostOS" = "mingw32" -a "$EnableDistroToolchain" = "NO"; then
     FP_INSTALL_WINDOWS_TOOLCHAIN
-    FP_SETUP_WINDOWS_TOOLCHAIN(["$hardtop/inplace/mingw"], ["$hardtop/inplace/mingw"])
+    FP_SETUP_WINDOWS_TOOLCHAIN([$hardtop/inplace/mingw], [$hardtop/inplace/mingw])
 else
     AC_PATH_TOOL([CC],[gcc], [clang])
     AC_PATH_TOOL([CXX],[g++], [clang++])


=====================================
distrib/configure.ac.in
=====================================
@@ -104,7 +104,7 @@ AC_ARG_ENABLE(distro-toolchain,
 )
 
 if test "$HostOS" = "mingw32" -a "$EnableDistroToolchain" = "NO"; then
-  FP_SETUP_WINDOWS_TOOLCHAIN(["$hardtop/inplace/mingw/"], ["$$topdir/../mingw/"])
+  FP_SETUP_WINDOWS_TOOLCHAIN([$hardtop/mingw/], [\$\$topdir/../../mingw/])
 fi
 
 dnl ** Which gcc to use?


=====================================
hadrian/bindist/config.mk.in
=====================================
@@ -37,6 +37,14 @@ $1 = $2
 endif
 endef
 
+# On Windows we normally want to make a relocatable bindist, to we
+# ignore flags like libdir
+ifeq "$(Windows_Host)" "YES"
+RelocatableBuild = YES
+else
+RelocatableBuild = NO
+endif
+
 prefix          = @prefix@
 
 datarootdir     = @datarootdir@
@@ -149,13 +157,6 @@ else
 GhcWithInterpreter=$(if $(findstring YES,$(DYNAMIC_GHC_PROGRAMS)),YES,NO)
 endif
 
-# On Windows we normally want to make a relocatable bindist, to we
-# ignore flags like libdir
-ifeq "$(Windows_Host)" "YES"
-RelocatableBuild = YES
-else
-RelocatableBuild = NO
-endif
 
 
 # runhaskell and hsc2hs are special, in that other compilers besides


=====================================
hadrian/src/Rules/BinaryDist.hs
=====================================
@@ -259,6 +259,8 @@ bindistRules = do
         copyFile ("hadrian" -/- "bindist" -/- "config.mk.in") (bindistFilesDir -/- "config.mk.in")
         copyFile ("hadrian" -/- "cfg" -/- "default.target.in") (bindistFilesDir -/- "default.target.in")
         copyFile ("hadrian" -/- "cfg" -/- "default.host.target.in") (bindistFilesDir -/- "default.host.target.in")
+
+        -- todo: do we need these wrappers on windows
         forM_ bin_targets $ \(pkg, _) -> do
           needed_wrappers <- pkgToWrappers pkg
           forM_ needed_wrappers $ \wrapper_name -> do


=====================================
m4/fp_settings.m4
=====================================
@@ -43,7 +43,7 @@ dnl ghc-toolchain.
 AC_DEFUN([SUBST_TOOLDIR],
 [
     dnl and Note [How we configure the bundled windows toolchain]
-    $1=`echo $$1 | sed 's%'"$mingw_prefix"'%$mingw_install_prefix%'`
+    $1=`echo $$1 | sed 's%'"$mingw_prefix"'%'"$mingw_install_prefix'"%'`
 ])
 
 # FP_SETTINGS



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/631657d10ef82405b1f05ff07ab8189c31135afc...9339bffd41022e4734d35ce01683f57d1e47fb5a

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/631657d10ef82405b1f05ff07ab8189c31135afc...9339bffd41022e4734d35ce01683f57d1e47fb5a
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230815/bee6b7a8/attachment-0001.html>


More information about the ghc-commits mailing list