The arch-specific lib contains code which external callers depend on;
ensure the whole archive is linked into minios.o.
Signed-off-by: Martin Lucina <martin@lucina.net>
# XXX: Note that HEAD_OBJ is linked into the final minios.o
# This is so that we don't have to hunt for it in the rumprun build of app-tools.
$(OBJ_DIR)/minios.o: links $(OBJS) arch_lib
- $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(OBJS) $(LDARCHLIB) $(LDLIBS) -o $@
+ $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(OBJS) --whole-archive $(LDARCHLIB) --no-whole-archive $(LDLIBS) -o $@
$(OBJCOPY) -w $(GLOBAL_PREFIXES) -G _start $@ $@
$(OBJ_DIR)/minios.lds: $(LDSCRIPT)