summaryrefslogtreecommitdiff
path: root/bootloader/bootloader.make
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-13 19:02:27 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-13 19:02:27 -0400
commite2adc6781fded00884ddb0161eb0f53b967f4785 (patch)
tree701bc69559ae4d933137549b99ce355afee33cc3 /bootloader/bootloader.make
parent09785a8499b601abc9eac7640060c12eba962b56 (diff)
bootloader: Work around linker wonkiness that broke PP bootloader builds.
Change-Id: I8e32c1605c0844c6f1980919ede61ca674b00bbb
Diffstat (limited to 'bootloader/bootloader.make')
-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