From 727be8f2c13ef5841de7659d0d041740f1951fc2 Mon Sep 17 00:00:00 2001 From: rrt Date: Fri, 14 Apr 2000 15:55:00 +0000 Subject: [PATCH] [project @ 2000-04-14 15:55:00 by rrt] Fixed -split-objs and removed last vestiges of dLL_ifs.hi. --- mk/config.mk.in | 8 ++++++-- mk/suffix.mk | 6 ++++-- mk/target.mk | 7 +++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/mk/config.mk.in b/mk/config.mk.in index f18a1e7..c52eeda 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -216,11 +216,15 @@ endif # things (incl "+") happens when compiling with this compiler GhcLibHcOpts=-O -SplitObjs = YES + # Win32 only: Enable the RTS and libraries to be built as DLLs -# +# Don't split object files for libs if we're building DLLs EnableWin32DLLs=@EnableWin32DLLs@ +ifeq "($EnableWin32DLLs)" "YES" +SplitObjs=NO +endif + # Strip local symbols from libraries? This can make the libraries smaller, # but makes debugging somewhat more difficult. Doesn't work with all ld's. diff --git a/mk/suffix.mk b/mk/suffix.mk index 1efd5b4..3793f73 100644 --- a/mk/suffix.mk +++ b/mk/suffix.mk @@ -35,8 +35,10 @@ HC_SPLIT_PRE= \ $(FIND) $(basename $@) -name '*.$(way_)o' -print | xargs $(RM) __rm_food ; fi HC_SPLIT_POST = touch $@ -HC_PRE__ = $(patsubst %,$(HC_SPLIT_PRE) ; ,$(filter -split-objs,$(HC_OPTS))) -HC_POST__ = $(patsubst %,$(HC_SPLIT_POST) ; ,$(filter -split-objs,$(HC_OPTS))) +ifeq "$(SplitObjs)" "YES" +HC_PRE__ = $(HC_SPLIT_PRE) ; +HC_POST__ = $(HC_SPLIT_POST) ; +endif SRC_HC_POST_OPTS += $(HC_POST__) SRC_HC_PRE_OPTS += $(HC_PRE__) diff --git a/mk/target.mk b/mk/target.mk index 93f131c..49e462d 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -449,7 +449,7 @@ endef # ifneq "$(HS_SRCS)" "" -ifneq "$(filter -split-objs,$(HC_OPTS))" "" +ifeq "$(SplitObjs)" "YES" define BUILD_LIB $(RM) $@ TMPDIR=$(TMPDIR); export TMPDIR; $(FIND) $(patsubst %.$(way_)o,%,$(LIBOBJS)) -name '*.$(way_)o' -print | xargs ar q $@ @@ -463,7 +463,7 @@ endif # ifeq "$(StripLibraries)" "YES" -ifneq "$(filter -split-objs,$(HC_OPTS))" "" +ifeq "$(SplitObjs)" "YES" SRC_HC_POST_OPTS += \ for i in $(basename $@)/*; do \ ld -r -x -o $$i.tmp $$i; \ @@ -495,8 +495,7 @@ DLL_IMPLIB_NAME = $(patsubst %.a, %_imp.a, $(LIBRARY)) endif $(DLL_NAME) :: $(LIBRARY) - $(BLD_DLL) --output-lib $(DLL_IMPLIB_NAME) -o $(DLL_NAME) $(LIBRARY) $(BLD_DLL_OPTS) - touch dLL_ifs.hi + $(BLD_DLL) --output-lib $(DLL_IMPLIB_NAME) -o $(DLL_NAME) $(LIBRARY) $(BLD_DLL_OPTS) endif # -- 1.7.10.4