mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-05-12 11:43:16 -04:00
build: Make bitmap object files position independent to silence linker warnings
Finally addresses the "warning: creating DT_TEXTREL in a shared object" warnings seen when linking plugins that reference bitmaps. This currently only happens with simulator builds using recent-ish toolchains (GCC >= 12 IIRC). However, binutils 2.46 promotes this warning to an error, so it's finally tracked down and addressed. Change-Id: I4b4926c14f7c0047496892c55009c26da2a4756d
This commit is contained in:
parent
88d4903d10
commit
0dc670d25c
2 changed files with 16 additions and 0 deletions
|
|
@ -50,3 +50,11 @@ $(BUILDDIR)/apps/bitmaps/remote_mono/%.c: $(ROOTDIR)/apps/bitmaps/remote_mono/%.
|
|||
$(BUILDDIR)/apps/bitmaps/remote_native/%.c: $(ROOTDIR)/apps/bitmaps/remote_native/%.bmp $(TOOLSDIR)/bmp2rb
|
||||
$(SILENT)mkdir -p $(dir $@) $(BMPINCDIR)
|
||||
$(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTENATIVE) -b -h $(BMPINCDIR) $< > $@
|
||||
|
||||
ifdef APP_TYPE
|
||||
# Bitmaps must be explicitly Position independent to avoid linker warnings
|
||||
$(BUILDDIR)/apps/bitmaps/native/%.o: CFLAGS += -fPIC
|
||||
$(BUILDDIR)/apps/bitmaps/mono/%.o: CFLAGS += -fPIC
|
||||
$(BUILDDIR)/apps/bitmaps/remote_mono/%.o: CFLAGS += -fPIC
|
||||
$(BUILDDIR)/apps/bitmaps/remote_native/%.o: CFLAGS += -fPIC
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -58,4 +58,12 @@ $(BUILDDIR)/apps/plugins/bitmaps/remote_native/%.c: $(ROOTDIR)/apps/plugins/bitm
|
|||
$(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
|
||||
$(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTENATIVE) -b -h $(PBMPINCDIR) $< > $@
|
||||
|
||||
ifdef APP_TYPE
|
||||
# Bitmaps must be explicitly Position independent to avoid linker warnings
|
||||
$(BUILDDIR)/apps/plugins/bitmaps/native/%.o: CFLAGS += -fPIC
|
||||
$(BUILDDIR)/apps/plugins/bitmaps/mono/%.o: CFLAGS += -fPIC
|
||||
$(BUILDDIR)/apps/plugins/bitmaps/remote_mono/%.o: CFLAGS += -fPIC
|
||||
$(BUILDDIR)/apps/plugins/bitmaps/remote_native/%.o: CFLAGS += -fPIC
|
||||
endif
|
||||
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue