summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bootloader/bootloader.make5
1 files changed, 4 insertions, 1 deletions
diff --git a/bootloader/bootloader.make b/bootloader/bootloader.make
index 75ad082f84..25c49da011 100644
--- a/bootloader/bootloader.make
+++ b/bootloader/bootloader.make
@@ -16,6 +16,9 @@ BOOTLINK := $(BUILDDIR)/boot.link
CLEANOBJS += $(BUILDDIR)/bootloader.*
+# FIXME: PP arm targets need this, otherwise we can't find __div0
+EXTRA_SPECIAL_LIBS = $(call a2lnk, $(CORE_LIBS))
+
.SECONDEXPANSION:
$(BOOTLINK): $(BOOTLDS) $(CONFIGFILE)
@@ -25,7 +28,7 @@ $(BOOTLINK): $(BOOTLDS) $(CONFIGFILE)
$(BUILDDIR)/bootloader.elf: $$(OBJ) $(FIRMLIB) $(CORE_LIBS) $$(BOOTLINK)
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \
-L$(BUILDDIR)/firmware -lfirmware \
- -L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) \
+ -L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) $(EXTRA_SPECIAL_LIBS) \
-lgcc -T$(BOOTLINK) $(GLOBAL_LDOPTS) \
-Wl,--gc-sections -Wl,-Map,$(BUILDDIR)/bootloader.map