Make use of the $(GhcWithRegisterised) build flag from config.mk. You
can now get an unregisterised build by *either*
- setting GhcWithRegisterised to NO in build.mk, or
- adding 'u' to GhcLibWays.
The former will make all compilations unregisterised, whereas the
latter will require a '-unreg' flag to be passed to the compiler to
get the unregisterised build.
GHC_LIB_DIR GHC_RUNTIME_DIR GHC_UTILS_DIR GHC_INCLUDE_DIR \
GHC_OPT_HILEV_ASM GhcWithNativeCodeGen LeadingUnderscore\
GHC_UNLIT GHC_HSCPP GHC_HSC GHC_SYSMAN EnableWin32DLLs \
- CP RM CONTEXT_DIFF LibGmp \
- $(USER_WAY_NAMES) $(USER_WAY_OPTS)
+ CP RM CONTEXT_DIFF LibGmp GhcWithRegisterised \
+ USER_WAY_NAMES USER_WAY_OPTS
#
# When creating a binary distribution, we prefix the driver script
LeadingUnderscore
+GhcWithRegisterised
+
\end{verbatim}
Establish what executables to run for the various phases, what the
$TICKYing = ''; # set to t if compiling for ticky-ticky profiling
$PARing = ''; # set to p if compiling for PAR
$GRANing = ''; # set to g if compiling for GRAN
-$UNREGing = ''; # set to u if compiling unregisterised
+$UNREGing = ($GhcWithRegisterised eq 'YES') ? '' : 'u';
$Specific_hi_file = ''; # set by -ohi <file>; "-" for stdout
$Specific_dump_file = ''; # set by -odump <file>; "-" for stdout
$Using_dump_file = 0;
} elsif ( $UNREGing eq 'u' ) {
$BuildTag = '_u';
}
-
\end{code}
After the sanity checks, add flags to the necessary parts of the driver pipeline:
GhcUseGccForDebuggingAsm=YES
# Build a registerised version of hsc and runtime
-# (you'd be desperate or silly not to).
+# (unregisterised used for Hugs at the moment)
GhcWithRegisterised=YES
# Build a compiler with a native code generator backend