EXTRA_OBJS is not the right thing to be adding into the objects to be
put into a SplitObjs library - it causes certain objects to turn up
twice in the resulting library (eg. if EXTRA_OBJS duplicates some
objects also found in HS_OBJS).
In fact, EXTRA_OBJS is generally bogus and now isn't used anywhere, so
I've removed it.
Should fix the problem recently reported with PrimopWrappers occurring
twice in the libHSbase.a archive.
HSC_C_OBJS = $(addsuffix _hsc.$(way_)o,$(basename $(filter %.hsc,$(SRCS))))
-EXTRA_OBJS = $(addsuffix .$(way_)o,$(basename $(EXTRA_SRCS)))
-
# Always remove $(EXCLUDED_C_SRCS) from C_SRCS
EXCLUDED_C_SRCS = $(patsubst %.lhs, %_stub.c, $(HS_SRCS)) \
$(patsubst %.hs, %_stub.c, $(HS_SRCS))
ifeq "$(ArSupportsInput)" ""
define BUILD_LIB
$(RM) $@ $@.tmp
-(echo $(STUBOBJS) $(EXTRA_OBJS); $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o') | xargs ar q $@
+(echo $(STUBOBJS) $(C_OBJS); $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o') | xargs ar q $@
$(RANLIB) $@
endef
else
define BUILD_LIB
$(RM) $@ $@.tmp
-echo $(STUBOBJS) > $@.list
-echo $(EXTRA_OBJS) >> $@.list
+echo $(STUBOBJS) > $@.list
+echo $(C_OBJS) >> $@.list
$(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o' >> $@.list
$(AR) $(AR_OPTS) $@ $(ArSupportsInput) $@.list
$(RM) $@.list