# the compiler you build with is generating registerised binaries), but
# the stage2 compiler will be an unregisterised binary.
#
+ifneq "$(findstring $(HostArch_CPP), alpha hppa)" ""
+GhcUnregisterised=YES
+else
GhcUnregisterised=NO
+endif
# Build a compiler with a native code generator backend
# (as well as a C backend)
ArchSupportsNCG=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 powerpc)))
OsSupportsNCG=$(strip $(patsubst $(HostOS_CPP), YES, $(patsubst aix,,$(HostOS_CPP))))
-ifeq "$(OsSupportsNCG)$(ArchSupportsNCG)" "YESYES"
+ifeq "$(OsSupportsNCG)$(ArchSupportsNCG)$(GhcUnregisterised)" "YESYESNO"
GhcWithNativeCodeGen=YES
else
GhcWithNativeCodeGen=NO