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
This commit is contained in:
Frank Gevaerts 2019-07-19 15:16:37 +02:00
parent 8bd992c503
commit b0de98ad3b
2 changed files with 4 additions and 2 deletions

View file

@ -52,6 +52,8 @@ $(BUILDDIR)/sysfont.o: $(SYSFONT) $(BUILDDIR)/sysfont.h
SVNVERSION:=$(shell VERSION='$(VERSION)' $(TOOLSDIR)/version.sh $(ROOTDIR)) SVNVERSION:=$(shell VERSION='$(VERSION)' $(TOOLSDIR)/version.sh $(ROOTDIR))
OLDSVNVERSION:=$(shell grep 'RBVERSION' $(BUILDDIR)/rbversion.h 2>/dev/null|cut -d '"' -f 2 || echo "NOREVISION") OLDSVNVERSION:=$(shell grep 'RBVERSION' $(BUILDDIR)/rbversion.h 2>/dev/null|cut -d '"' -f 2 || echo "NOREVISION")
CORE_LIBS:=$(FIRMLIB)
ifneq ($(SVNVERSION),$(OLDSVNVERSION)) ifneq ($(SVNVERSION),$(OLDSVNVERSION))
.PHONY: $(BUILDDIR)/rbversion.h .PHONY: $(BUILDDIR)/rbversion.h
endif endif

View file

@ -247,7 +247,7 @@ $(LINKROM): $(ROMLDS)
# Having the latter first caused crashes on (at least) mini2g. # Having the latter first caused crashes on (at least) mini2g.
$(BUILDDIR)/rockbox.elf : $$(OBJ) $(FIRMLIB) $(VOICESPEEXLIB) $(CORE_LIBS) $$(LINKRAM) $(BUILDDIR)/rockbox.elf : $$(OBJ) $(FIRMLIB) $(VOICESPEEXLIB) $(CORE_LIBS) $$(LINKRAM)
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ $(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$(RBCODEC_BLD)/codecs $(call a2lnk, $(VOICESPEEXLIB)) \
-L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) \ -L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) \
-lgcc $(CORE_LDOPTS) -T$(LINKRAM) \ -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) $(BUILDDIR)/rombox.elf : $$(OBJ) $(FIRMLIB) $(VOICESPEEXLIB) $(CORE_LIBS) $$(LINKROM)
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ $(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$(RBCODEC_BLD)/codecs $(call a2lnk, $(VOICESPEEXLIB)) \
-L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) \ -L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) \
-lgcc $(CORE_LDOPTS) -T$(LINKROM) \ -lgcc $(CORE_LDOPTS) -T$(LINKROM) \