[project @ 2001-07-03 16:57:03 by sewardj]
authorsewardj <unknown>
Tue, 3 Jul 2001 16:57:03 +0000 (16:57 +0000)
committersewardj <unknown>
Tue, 3 Jul 2001 16:57:03 +0000 (16:57 +0000)
Plumb top-level --with-gcc=... value around the place.

configure.in
ghc/rts/Makefile
ghc/utils/hsc2hs/KludgedSystem.hs
ghc/utils/hsc2hs/Makefile

index 3c6316a..b7ff483 100644 (file)
@@ -386,7 +386,8 @@ AC_ARG_WITH(gcc,
 [  --with-gcc=<gcc command>
         Use a different command instead of 'gcc' for the GNU C compiler.
 ],
-[WhatGccIsCalled="$withval"],
+[WhatGccIsCalled="$withval"
+ CC="$withval"],
 [WhatGccIsCalled="gcc"]
 )
 AC_SUBST(WhatGccIsCalled)
index 5adfa21..27eeb21 100644 (file)
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.50 2001/06/06 10:35:39 rrt Exp $
+# $Id: Makefile,v 1.51 2001/07/03 16:57:03 sewardj Exp $
 #
 #  This is the Makefile for the runtime-system stuff.
 #  This stuff is written in C (and cannot be written in Haskell).
@@ -158,7 +158,7 @@ else
 # Pass --target to configure of GMP, so that building for mingwin under
 # cygwin works properly (when the host is not the same as the target)
 boot ::
-       cd gmp && ./configure --enable-shared=no --target=$(HOSTPLATFORM)
+       cd gmp && CC=$(WhatGccIsCalled) ./configure --enable-shared=no --target=$(HOSTPLATFORM)
 endif
 
 # Slight cheatage here to pass host as target, but x-compilation isn't supported by ghc.
index 4036df6..94a2441 100644 (file)
@@ -1,6 +1,6 @@
 {-# OPTIONS -cpp -fglasgow-exts #-}
 -----------------------------------------------------------------------------
--- $Id: KludgedSystem.hs,v 1.6 2001/04/02 16:10:05 rrt Exp $
+-- $Id: KludgedSystem.hs,v 1.7 2001/07/03 16:57:03 sewardj Exp $
 
 -- system that works feasibly under Windows (i.e. passes the command line to sh,
 -- because system() under Windows doesn't look at SHELL, and always uses CMD.EXE)
@@ -14,7 +14,7 @@ module KludgedSystem (system, defaultCompiler, progNameSuffix) where
 import System (system)
 
 defaultCompiler :: String
-defaultCompiler = "gcc"
+defaultCompiler = cGCC
 progNameSuffix = ""
 
 #else
@@ -35,7 +35,7 @@ system cmd = do
 foreign import "_getpid" unsafe getProcessID :: IO Int
 
 defaultCompiler :: String
-defaultCompiler = "gcc -mno-cygwin -mwin32"
+defaultCompiler = cGCC ++ " -mno-cygwin"
 progNameSuffix = ".exe"
 
 #endif /* mingw32_TARGET_OS */
index 72526e5..7bc13c0 100644 (file)
@@ -1,5 +1,5 @@
 # -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.16 2001/06/27 06:18:40 sof Exp $
+# $Id: Makefile,v 1.17 2001/07/03 16:57:03 sewardj Exp $
 
 TOP=../..
 include $(TOP)/mk/boilerplate.mk
@@ -66,6 +66,7 @@ $(CONFIG_HS) : $(FPTOOLS_TOP)/mk/config.mk Makefile
        @echo -n "Creating $(CONFIG_HS) ... "
        @echo "module Config where" >>$(CONFIG_HS)
        @echo "cDEFAULT_TMPDIR       = \"$(DEFAULT_TMPDIR)\"" >> $(CONFIG_HS)
+       @echo "cGCC                  = \"$(WhatGccIsCalled)\"" >> $(CONFIG_HS)
        @echo done.
 
 CLEAN_FILES += $(CONFIG_HS)