mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Move -Wl,-z,defs to GLOBAL_LDOPTS (instead of GCCOPTS), to avoid noise in older gcc output when not linking
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27260 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
66381088e7
commit
b8286d45be
6 changed files with 13 additions and 5 deletions
|
@ -121,6 +121,7 @@ else
|
|||
CODECLDFLAGS = -T$(CODECLINK_LDS) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map
|
||||
CODECFLAGS += -UDEBUG -DNDEBUG
|
||||
endif
|
||||
CODECLDFLAGS += $(GLOBAL_LDOPTS)
|
||||
|
||||
$(CODECDIR)/%-pre.map: $(CODEC_CRT0) $(CODECLINK_LDS) $(CODECDIR)/%.o $(CODECLIB)
|
||||
$(call PRINTS,LD $(@F))$(CC) $(CODECFLAGS) -o $(CODECDIR)/$*-pre.elf \
|
||||
|
|
|
@ -87,6 +87,7 @@ else
|
|||
PLUGINLDFLAGS = -T$(PLUGINLINK_LDS) -Wl,--gc-sections -Wl,-Map,$*.map
|
||||
OVERLAYLDFLAGS = -T$(OVERLAYREF_LDS) -Wl,--gc-sections -Wl,-Map,$*.refmap
|
||||
endif
|
||||
PLUGINLDFLAGS += $(GLOBAL_LDOPTS)
|
||||
|
||||
$(BUILDDIR)/%.rock:
|
||||
$(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $(BUILDDIR)/$*.elf \
|
||||
|
|
|
@ -24,6 +24,7 @@ $(BOOTLINK): $(BOOTLDS)
|
|||
$(BUILDDIR)/bootloader.elf: $$(OBJ) $$(FIRMLIB) $$(BOOTLINK)
|
||||
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \
|
||||
$(FIRMLIB) -lgcc -L$(BUILDDIR)/firmware -T$(BOOTLINK) \
|
||||
$(GLOBAL_LDOPTS) \
|
||||
-Wl,--gc-sections -Wl,-Map,$(BUILDDIR)/bootloader.map
|
||||
|
||||
$(BUILDDIR)/bootloader.bin : $(BUILDDIR)/bootloader.elf
|
||||
|
|
7
tools/configure
vendored
7
tools/configure
vendored
|
@ -9,7 +9,10 @@
|
|||
#
|
||||
|
||||
# global CC options for all platforms
|
||||
CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -Wl,-z,defs"
|
||||
CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe"
|
||||
|
||||
# global LD options for all platforms
|
||||
GLOBAL_LDOPTS="-Wl,-z,defs"
|
||||
|
||||
use_logf="#undef ROCKBOX_HAS_LOGF"
|
||||
use_bootchart="#undef DO_BOOTCHART"
|
||||
|
@ -3097,6 +3100,7 @@ sed > Makefile \
|
|||
-e "s<@GCCOPTS@<${GCCOPTS}<g" \
|
||||
-e "s<@TARGET_INC@<${TARGET_INC}<g" \
|
||||
-e "s<@LDOPTS@<${LDOPTS}<g" \
|
||||
-e "s<@GLOBAL_LDOPTS@<${GLOBAL_LDOPTS}<g" \
|
||||
-e "s<@LOADADDRESS@<${loadaddress}<g" \
|
||||
-e "s<@EXTRADEF@<${extradefines}<g" \
|
||||
-e "s<@APPSDIR@<${appsdir}<g" \
|
||||
|
@ -3176,6 +3180,7 @@ export TARGET_INC=@TARGET_INC@
|
|||
export LOADADDRESS=@LOADADDRESS@
|
||||
export SHARED_FLAG=@SHARED_FLAG@
|
||||
export LDOPTS=@LDOPTS@
|
||||
export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@
|
||||
export GCCVER=@GCCVER@
|
||||
export GCCNUM=@GCCNUM@
|
||||
export UNAME=@UNAME@
|
||||
|
|
|
@ -164,13 +164,13 @@ $(BUILDDIR)/rockbox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(L
|
|||
-L$(BUILDDIR)/firmware -lfirmware \
|
||||
-L$(BUILDDIR)/lib -lskin_parser \
|
||||
-L$(BUILDDIR)/apps/codecs $(VOICESPEEXLIB:lib%.a=-l%) \
|
||||
-lgcc $(BOOTBOXLDOPTS) \
|
||||
-lgcc $(BOOTBOXLDOPTS) $(GLOBAL_LDOPTS) \
|
||||
-T$(LINKRAM) -Wl,-Map,$(BUILDDIR)/rockbox.map
|
||||
|
||||
$(BUILDDIR)/rombox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LINKROM)
|
||||
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \
|
||||
$(VOICESPEEXLIB) $(FIRMLIB) -lgcc -L$(BUILDDIR)/firmware \
|
||||
-T$(LINKROM) -Wl,-Map,$(BUILDDIR)/rombox.map
|
||||
$(VOICESPEEXLIB) $(FIRMLIB) -lgcc $(GLOBAL_LDOPTS) \
|
||||
-L$(BUILDDIR)/firmware -T$(LINKROM) -Wl,-Map,$(BUILDDIR)/rombox.map
|
||||
|
||||
$(BUILDDIR)/rockbox.bin : $(BUILDDIR)/rockbox.elf
|
||||
$(call PRINTS,OC $(@F))$(OC) $(if $(filter yes, $(USE_ELF)), -S -x, -O binary) $< $@
|
||||
|
|
|
@ -28,7 +28,7 @@ $(SIMLIB): $$(SIMOBJ) $(UIBMP)
|
|||
|
||||
# SIMLIB needs to be linked twice for some reason
|
||||
$(BUILDDIR)/$(BINARY): $$(OBJ) $(SIMLIB) $(VOICESPEEXLIB) $(FIRMLIB) $(SKINLIB)
|
||||
$(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(SIMLIB) $(LDOPTS)
|
||||
$(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(SIMLIB) $(LDOPTS) $(GLOBAL_LDOPTS)
|
||||
|
||||
$(BUILDDIR)/uisimulator/%.o: $(ROOTDIR)/uisimulator/%.c
|
||||
$(SILENT)mkdir -p $(dir $@)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue