[PATCH] hsc2hs: use configuration of current compiler, not built

Sergei Trofimovich slyich at gmail.com
Wed Feb 13 08:33:57 CET 2013


From: Sergei Trofimovich <slyfox at gentoo.org>

Fixed bootstrap failure on linux for --target=mingw32 of such kind:

"/usr/bin/ghc" -o utils/hsc2hs/dist/build/tmp/hsc2hs -static  -H32m -O  -w  -package-db libraries/bootstrapping.conf  -hide-all-packages -i -iutils/hsc2hs/. -iutils/hsc2hs/dist/build -iutils/hsc2hs/dist/build/autogen -Iutils/hsc2hs/dist/build -Iutils/hsc2hs/dist/build/autogen     -optP-include -optPutils/hsc2hs/dist/build/autogen/cabal_macros.h -package base-4.6.0.0 -package containers-0.5.0.0 -package directory-1.2.0.0 -package filepath-1.3.0.1 -package process-1.1.0.2  -XHaskell98 -XCPP -XForeignFunctionInterface  -no-user-package-db -rtsopts      -odir utils/hsc2hs/dist/build -hidir utils/hsc2hs/dist/build -stubdir utils/hsc2hs/dist/build -hisuf hi -osuf  o -hcsuf hc   utils/hsc2hs/dist/build/Main.o utils/hsc2hs/dist/build/HSCParser.o utils/hsc2hs/dist/build/DirectCodegen.o utils/hsc2hs/dist/build/CrossCodegen.o utils/hsc2hs/dist/build/UtilsCodegen.o utils/hsc2hs/dist/build/Common.o utils/hsc2hs/dist/build/C.o utils/hsc2hs/dist/build/Flags.o utils/hsc2hs/dist/build/Paths_hsc2hs.o
utils/hsc2hs/dist/build/Main.o: In function `s4cN_info':
(.text+0x182): undefined reference to `GetModuleFileNameW'

Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
---
 Main.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Main.hs b/Main.hs
index 30b3a2d..5309179 100644
--- a/Main.hs
+++ b/Main.hs
@@ -11,7 +11,7 @@
 -- See the documentation in the Users' Guide for more details.
 
 #if defined(__GLASGOW_HASKELL__) && !defined(BUILD_NHC)
-#include "../../includes/ghcconfig.h"
+#include "ghcconfig.h"
 #endif
 
 import Control.Monad            ( liftM, forM_ )
-- 
1.8.1.1




More information about the ghc-devs mailing list