From b0de98ad3b1391ec0dfe4f8eced0a6833490cd8f Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Fri, 19 Jul 2019 15:16:37 +0200 Subject: [PATCH] Put -lfirmware in CORE_LIBS, to fix -thumb builds For unknown reasons, -thumb builds need -lfirmware after -lrbcodec (but still before -lunwarminder)i. Other builds are still happy if we do that. Including it via CORE_LIBS instead of explicitly achieves that. Change-Id: Id69e4a0c042f90f71cfd9a72202ce4d8ef6a4181 --- firmware/firmware.make | 2 ++ tools/root.make | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/firmware/firmware.make b/firmware/firmware.make index 3d79837871..6c01250bde 100644 --- a/firmware/firmware.make +++ b/firmware/firmware.make @@ -52,6 +52,8 @@ $(BUILDDIR)/sysfont.o: $(SYSFONT) $(BUILDDIR)/sysfont.h SVNVERSION:=$(shell VERSION='$(VERSION)' $(TOOLSDIR)/version.sh $(ROOTDIR)) OLDSVNVERSION:=$(shell grep 'RBVERSION' $(BUILDDIR)/rbversion.h 2>/dev/null|cut -d '"' -f 2 || echo "NOREVISION") +CORE_LIBS:=$(FIRMLIB) + ifneq ($(SVNVERSION),$(OLDSVNVERSION)) .PHONY: $(BUILDDIR)/rbversion.h endif diff --git a/tools/root.make b/tools/root.make index 0075ed2137..ecab921c87 100644 --- a/tools/root.make +++ b/tools/root.make @@ -247,7 +247,7 @@ $(LINKROM): $(ROMLDS) # Having the latter first caused crashes on (at least) mini2g. $(BUILDDIR)/rockbox.elf : $$(OBJ) $(FIRMLIB) $(VOICESPEEXLIB) $(CORE_LIBS) $$(LINKRAM) $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ - -L$(BUILDDIR)/firmware -lfirmware \ + -L$(BUILDDIR)/firmware \ -L$(RBCODEC_BLD)/codecs $(call a2lnk, $(VOICESPEEXLIB)) \ -L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) \ -lgcc $(CORE_LDOPTS) -T$(LINKRAM) \ @@ -255,7 +255,7 @@ $(BUILDDIR)/rockbox.elf : $$(OBJ) $(FIRMLIB) $(VOICESPEEXLIB) $(CORE_LIBS) $$(LI $(BUILDDIR)/rombox.elf : $$(OBJ) $(FIRMLIB) $(VOICESPEEXLIB) $(CORE_LIBS) $$(LINKROM) $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ - -L$(BUILDDIR)/firmware -lfirmware \ + -L$(BUILDDIR)/firmware \ -L$(RBCODEC_BLD)/codecs $(call a2lnk, $(VOICESPEEXLIB)) \ -L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) \ -lgcc $(CORE_LDOPTS) -T$(LINKROM) \