@echo "cLdIsGNULd = \"$(LdIsGNULd)\"" >> $(CONFIG_HS)
@echo "cLD_X :: String" >> $(CONFIG_HS)
@echo "cLD_X = \"$(LD_X)\"" >> $(CONFIG_HS)
- @echo "cPROJECT_DIR :: String" >> $(CONFIG_HS)
- @echo "cPROJECT_DIR = \"$(PROJECT_DIR)\"" >> $(CONFIG_HS)
@echo "cGHC_DRIVER_DIR_REL :: String" >> $(CONFIG_HS)
@echo "cGHC_DRIVER_DIR_REL = \"$(GHC_DRIVER_DIR_REL)\"" >> $(CONFIG_HS)
@echo "cGHC_TOUCHY_PGM :: String" >> $(CONFIG_HS)
@echo "cRelocatableBuild = False" >> $(CONFIG_HS)
endif
@echo "cLibFFI :: Bool" >> $(CONFIG_HS)
-ifeq "$(UseLibFFI)" "YES"
+ifeq "$(UseLibFFIForAdjustors)" "YES"
@echo "cLibFFI = True" >> $(CONFIG_HS)
else
@echo "cLibFFI = False" >> $(CONFIG_HS)
SRC_HC_OPTS += -DJAVA
endif
-ifeq ($(UseLibFFI),YES)
-SRC_HC_OPTS += -DUSE_LIBFFI
-SRC_HSC2HS_OPTS += -DUSE_LIBFFI
-endif
-
ifeq "$(BootingFromHc)" "YES"
# HC files are always from a self-booted compiler
bootstrapped = YES
SRC_LD_OPTS += -debug
endif
+SRC_HC_OPTS += -I$(FPTOOLS_TOP)/libffi/build/include
+SRC_HSC2HS_OPTS += -I$(FPTOOLS_TOP)/libffi/build/include
+
ALL_DIRS += ghci
# If we are going to use dynamic libraries instead of .o files for ghci,
EXCLUDED_SRCS += ghci/keepCAFsForGHCi.c
endif
-# Enable readline if either:
-# - we're building stage 1 and $(GhcHasReadline)="YES"
-# - we're building stage 2/3, and we have built the readline package
+# Enable editline if either:
+# - we're building stage 1 and $(GhcHasEditline)="YES"
+# - we're building stage 2/3, and we have built the editline package
#
-# But we don't enable readline on Windows, because readline is fairly
-# broken there.
+# But we don't enable editline on Windows, as Windows terminals have
+# editline-like support builtin.
#
ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
ifeq "$(stage)" "1"
-ifeq "$(GhcHasReadline)" "YES"
-SRC_HC_OPTS += -package readline -DUSE_READLINE
-PKG_DEPENDS += readline
+ifeq "$(GhcHasEditline)" "YES"
+SRC_HC_OPTS += -package editline -DUSE_EDITLINE
+PKG_DEPENDS += editline
endif
else
-ifeq "$(wildcard $(FPTOOLS_TOP_ABS)/libraries/readline/unbuildable)" ""
-SRC_HC_OPTS += -package readline -DUSE_READLINE
-PKG_DEPENDS += readline
+ifeq "$(wildcard $(FPTOOLS_TOP_ABS)/libraries/editline/unbuildable)" ""
+SRC_HC_OPTS += -package editline -DUSE_EDITLINE
+PKG_DEPENDS += editline
endif
endif # stage=1
endif # not windows
SRC_HC_OPTS += \
-cpp -fglasgow-exts -fno-generics -Rghc-timing \
- -I. -Iparser
+ -I. -Iparser -Iutil
# Omitted: -I$(GHC_INCLUDE_DIR)
# We should have -I$(GHC_INCLUDE_DIR) in SRC_HC_OPTS,
SRC_HC_OPTS += -ignore-package lang
SRC_CC_OPTS += -Iparser -I. -O
-SRC_HC_OPTS += -recomp $(GhcHcOpts) $(GhcStage$(stage)HcOpts)
+SRC_HC_OPTS += $(GhcHcOpts) $(GhcStage$(stage)HcOpts)
SRC_HC_OPTS += -H16M
ifeq "$(BootingFromHc)" "YES"
# The standard suffix rule for compiling a Haskell file
# adds these flags to the command line
-# There used to be a -no-recomp flag on PrimOp, but why?
+# There used to be a -fforce-recomp flag on PrimOp, but why?
# It's an expensive module to recompile!
prelude/PrimOp_HC_OPTS = -H80m
# Careful optimisation of the parser: we don't want to throw everything
# at it, because that takes too long and doesn't buy much, but we do want
# to inline certain key external functions, so we instruct GHC not to
-# throw away inlinings as it would normally do in -Onot mode:
-parser/Parser_HC_OPTS += -Onot -fno-ignore-interface-pragmas
+# throw away inlinings as it would normally do in -O0 mode:
+parser/Parser_HC_OPTS += -O0 -fno-ignore-interface-pragmas
ifeq "$(HOSTPLATFORM)" "hppa1.1-hp-hpux9"
rename/RnMonad_HC_OPTS = -O2 -O2-for-C
include $(GHC_COMPAT_DIR)/compat.mk
endif
-SRC_LD_OPTS += -no-link-chk
-
ifeq "$(GhcUnregisterised)" "NO"
ifeq "$(HOSTPLATFORM)" "ia64-unknown-linux"
# needed for generating proper relocation in large binaries: trac #856
# careful to recompile stuff you need if you reconfigure or change HsVersions.h.
# Aargh, these don't work properly anyway, because GHC's recompilation checker
-# just reports "compilation NOT required". Do we have to add -no-recomp for each
+# just reports "compilation NOT required". Do we have to add -fforce-recomp for each
# of these .hs files? I haven't done anything about this yet.
$(odir)/codeGen/Bitmap.$(way_)o : ../includes/MachDeps.h