From dac8c9b9e8b570b81bea7077b6b2b98c70f20c70 Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 9 Mar 2000 11:49:34 +0000 Subject: [PATCH] [project @ 2000-03-09 11:49:34 by simonmar] Disable module initialisation under Hugs until we can sort out the hairy linking issues. --- ghc/rts/RtsStartup.c | 8 +++++++- ghc/rts/StgStartup.hc | 10 +++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ghc/rts/RtsStartup.c b/ghc/rts/RtsStartup.c index 6de0350..e02426a 100644 --- a/ghc/rts/RtsStartup.c +++ b/ghc/rts/RtsStartup.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsStartup.c,v 1.31 2000/03/08 17:48:24 simonmar Exp $ + * $Id: RtsStartup.c,v 1.32 2000/03/09 11:49:34 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -133,7 +133,9 @@ startupHaskell(int argc, char *argv[]) #endif /* run the per-module initialisation code */ +#if !defined(INTERPRETER) initModules(); +#endif #if defined(PROFILING) || defined(DEBUG) initProfiling2(); @@ -203,6 +205,8 @@ startupHaskell(int argc, char *argv[]) StgRun to call this stuff. -------------------------------------------------------------------------- */ +#ifndef INTERPRETER + /* The init functions use an explicit stack... */ #define INIT_STACK_SIZE (BLOCK_SIZE * 4) @@ -219,6 +223,8 @@ initModules ( void ) StgRun((StgFunPtr)stg_init, NULL/* no reg table */); } +#endif /* !INTERPRETER */ + /* ----------------------------------------------------------------------------- * Shutting down the RTS - two ways of doing this, one which * calls exit(), one that doesn't. diff --git a/ghc/rts/StgStartup.hc b/ghc/rts/StgStartup.hc index 631e991..997277a 100644 --- a/ghc/rts/StgStartup.hc +++ b/ghc/rts/StgStartup.hc @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgStartup.hc,v 1.6 2000/03/08 17:48:24 simonmar Exp $ + * $Id: StgStartup.hc,v 1.7 2000/03/09 11:49:34 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -129,8 +129,14 @@ STGFUN(stg_enterStackTop) /* ----------------------------------------------------------------------------- Special STG entry points for module registration. + + This stuff is problematic for Hugs, because it introduces a + dependency between the RTS and the program (ie. __init_Main). So + we currently disable module initialisation for Hugs. -------------------------------------------------------------------------- */ +#ifndef INTERPRETER + STGFUN(stg_init_ret) { FB_ @@ -153,3 +159,5 @@ STGFUN(stg_init) START_MOD_INIT(__init_PrelGHC); END_MOD_INIT(); + +#endif /* !INTERPRETER */ -- 1.7.10.4