diff --git a/repos/base-hw/src/bootstrap/hw/target.mk b/repos/base-hw/src/bootstrap/hw/target.mk index 66b680ad8..6202efab2 100644 --- a/repos/base-hw/src/bootstrap/hw/target.mk +++ b/repos/base-hw/src/bootstrap/hw/target.mk @@ -9,9 +9,12 @@ ifneq ($(INSTALL_DIR),) ifneq ($(DEBUG_DIR),) $(TARGET): $(INSTALL_DIR)/$(BOOTSTRAP_OBJ) -$(INSTALL_DIR)/$(BOOTSTRAP_OBJ) : $(DEBUG_DIR)/$(BOOTSTRAP_OBJ) +$(BOOTSTRAP_OBJ).stripped: $(BOOTSTRAP_OBJ) $(VERBOSE)$(STRIP) --strip-debug -o $@ $< +$(INSTALL_DIR)/$(BOOTSTRAP_OBJ) : $(BOOTSTRAP_OBJ).stripped + $(VERBOSE)ln -sf $(CURDIR)/$< $@ + $(DEBUG_DIR)/$(BOOTSTRAP_OBJ) : $(BOOTSTRAP_OBJ) $(VERBOSE)ln -sf $(CURDIR)/$(BOOTSTRAP_OBJ) $(DEBUG_DIR)/$(BOOTSTRAP_OBJ) endif @@ -22,4 +25,4 @@ $(BOOTSTRAP_OBJ): $(VERBOSE)$(LD) $(LD_MARCH) -u _start --whole-archive -r $(LINK_ITEMS) $(LIBCXX_GCC) -o $@ clean cleanall: - $(VERBOSE)rm -f $(BOOTSTRAP_OBJ) + $(VERBOSE)rm -f $(BOOTSTRAP_OBJ) $(BOOTSTRAP_OBJ).stripped