From 56aacf9222c1c8f1d7aa6079bf5eb9c0a8bab7f7 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 25 Feb 2004 11:34:30 +0000 Subject: [PATCH] [project @ 2004-02-25 11:34:29 by simonmar] Allow configuration of RTS ways by tweaking the GhcRTSWays variable. Add default settings to config.mk.in, and add a comment to explain which values make sense here. Also, I disabled the debug_p way by default; it's of limited usefulness to the average punter. --- ghc/rts/Makefile | 22 +--------------------- mk/config.mk.in | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 21 deletions(-) diff --git a/ghc/rts/Makefile b/ghc/rts/Makefile index 39322ba..f18e0a8 100644 --- a/ghc/rts/Makefile +++ b/ghc/rts/Makefile @@ -31,27 +31,7 @@ HC=$(GHC_INPLACE) # ----------------------------------------------------------------------------- # RTS ways -WAYS=$(GhcLibWays) thr debug - -ifneq "$(findstring p, $(GhcLibWays))" "" -WAYS += thr_p debug_p -endif - -# Way 'thr': -WAY_thr_NAME=threaded -WAY_thr_HC_OPTS=-optc-DTHREADED_RTS - -# Way 'thr_p': -WAY_thr_p_NAME=threaded profiled -WAY_thr_p_HC_OPTS=-optc-DTHREADED_RTS -prof - -# Way 'debug': -WAY_debug_NAME=debug -WAY_debug_HC_OPTS=-optc-DDEBUG - -# Way 'debug_p': -WAY_debug_p_NAME=debug profiled -WAY_debug_p_HC_OPTS=-optc-DDEBUG -prof +WAYS=$(GhcLibWays) $(GhcRTSWays) ifneq "$(findstring debug, $(way))" "" GhcRtsHcOpts= diff --git a/mk/config.mk.in b/mk/config.mk.in index afd2941..66732d8 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -281,6 +281,22 @@ else GhcLibWays=p endif +# In addition, the RTS is built in some further variations. Ways that +# make sense here: +# +# thr : threaded +# thr_p : threaded profiled +# debug : debugging (compile with -g for the C compiler, and -DDEBUG) +# debug_p : debugging profiled +# debug_thr : debugging threaded +# debug_thr_p : debugging threaded profiled +# +ifeq "$(BootingFromHc)" "YES" +GhcRTSWays= +else +GhcRTSWays=thr thr_p debug +endif + # Option flags to pass to GHC when it's compiling modules in # fptools/libraries. Typically these are things like -O or # -dcore-lint or -H32m. The ones that are *essential* are wired into @@ -1040,6 +1056,26 @@ WAY_mg_NAME=GranSim WAY_mg_HC_OPTS=-gransim # +# These ways apply to the RTS only: +# + +# Way 'thr': +WAY_thr_NAME=threaded +WAY_thr_HC_OPTS=-optc-DTHREADED_RTS + +# Way 'thr_p': +WAY_thr_p_NAME=threaded profiled +WAY_thr_p_HC_OPTS=-optc-DTHREADED_RTS -prof + +# Way 'debug': +WAY_debug_NAME=debug +WAY_debug_HC_OPTS=-optc-DDEBUG + +# Way 'debug_p': +WAY_debug_p_NAME=debug profiled +WAY_debug_p_HC_OPTS=-optc-DDEBUG -prof + +# # Add user-way configurations here: # WAY_A_NAME= -- 1.7.10.4