diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2010-07-03 20:58:22 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2010-07-03 20:58:22 +0000 |
commit | b8286d45be0cdaffccfe684dde7385e2c042141d (patch) | |
tree | d956deba40cb7d43c36ec070301205f2cd120607 | |
parent | 66381088e7e402f865b937c80e7c80f18c97e039 (diff) | |
download | rockbox-b8286d45be0cdaffccfe684dde7385e2c042141d.tar.gz rockbox-b8286d45be0cdaffccfe684dde7385e2c042141d.zip |
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
-rw-r--r-- | apps/codecs/codecs.make | 1 | ||||
-rw-r--r-- | apps/plugins/plugins.make | 1 | ||||
-rw-r--r-- | bootloader/bootloader.make | 1 | ||||
-rwxr-xr-x | tools/configure | 7 | ||||
-rw-r--r-- | tools/root.make | 6 | ||||
-rw-r--r-- | uisimulator/uisimulator.make | 2 |
6 files changed, 13 insertions, 5 deletions
diff --git a/apps/codecs/codecs.make b/apps/codecs/codecs.make index 96c12dee35..aab23b01a2 100644 --- a/apps/codecs/codecs.make +++ b/apps/codecs/codecs.make | |||
@@ -121,6 +121,7 @@ else | |||
121 | CODECLDFLAGS = -T$(CODECLINK_LDS) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map | 121 | CODECLDFLAGS = -T$(CODECLINK_LDS) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map |
122 | CODECFLAGS += -UDEBUG -DNDEBUG | 122 | CODECFLAGS += -UDEBUG -DNDEBUG |
123 | endif | 123 | endif |
124 | CODECLDFLAGS += $(GLOBAL_LDOPTS) | ||
124 | 125 | ||
125 | $(CODECDIR)/%-pre.map: $(CODEC_CRT0) $(CODECLINK_LDS) $(CODECDIR)/%.o $(CODECLIB) | 126 | $(CODECDIR)/%-pre.map: $(CODEC_CRT0) $(CODECLINK_LDS) $(CODECDIR)/%.o $(CODECLIB) |
126 | $(call PRINTS,LD $(@F))$(CC) $(CODECFLAGS) -o $(CODECDIR)/$*-pre.elf \ | 127 | $(call PRINTS,LD $(@F))$(CC) $(CODECFLAGS) -o $(CODECDIR)/$*-pre.elf \ |
diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make index febc80ac95..4bd0cc952e 100644 --- a/apps/plugins/plugins.make +++ b/apps/plugins/plugins.make | |||
@@ -87,6 +87,7 @@ else | |||
87 | PLUGINLDFLAGS = -T$(PLUGINLINK_LDS) -Wl,--gc-sections -Wl,-Map,$*.map | 87 | PLUGINLDFLAGS = -T$(PLUGINLINK_LDS) -Wl,--gc-sections -Wl,-Map,$*.map |
88 | OVERLAYLDFLAGS = -T$(OVERLAYREF_LDS) -Wl,--gc-sections -Wl,-Map,$*.refmap | 88 | OVERLAYLDFLAGS = -T$(OVERLAYREF_LDS) -Wl,--gc-sections -Wl,-Map,$*.refmap |
89 | endif | 89 | endif |
90 | PLUGINLDFLAGS += $(GLOBAL_LDOPTS) | ||
90 | 91 | ||
91 | $(BUILDDIR)/%.rock: | 92 | $(BUILDDIR)/%.rock: |
92 | $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $(BUILDDIR)/$*.elf \ | 93 | $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $(BUILDDIR)/$*.elf \ |
diff --git a/bootloader/bootloader.make b/bootloader/bootloader.make index a2883fb2af..0118235bb7 100644 --- a/bootloader/bootloader.make +++ b/bootloader/bootloader.make | |||
@@ -24,6 +24,7 @@ $(BOOTLINK): $(BOOTLDS) | |||
24 | $(BUILDDIR)/bootloader.elf: $$(OBJ) $$(FIRMLIB) $$(BOOTLINK) | 24 | $(BUILDDIR)/bootloader.elf: $$(OBJ) $$(FIRMLIB) $$(BOOTLINK) |
25 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ | 25 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ |
26 | $(FIRMLIB) -lgcc -L$(BUILDDIR)/firmware -T$(BOOTLINK) \ | 26 | $(FIRMLIB) -lgcc -L$(BUILDDIR)/firmware -T$(BOOTLINK) \ |
27 | $(GLOBAL_LDOPTS) \ | ||
27 | -Wl,--gc-sections -Wl,-Map,$(BUILDDIR)/bootloader.map | 28 | -Wl,--gc-sections -Wl,-Map,$(BUILDDIR)/bootloader.map |
28 | 29 | ||
29 | $(BUILDDIR)/bootloader.bin : $(BUILDDIR)/bootloader.elf | 30 | $(BUILDDIR)/bootloader.bin : $(BUILDDIR)/bootloader.elf |
diff --git a/tools/configure b/tools/configure index 70580dbfe0..c7185f0982 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -9,7 +9,10 @@ | |||
9 | # | 9 | # |
10 | 10 | ||
11 | # global CC options for all platforms | 11 | # global CC options for all platforms |
12 | CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -Wl,-z,defs" | 12 | CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe" |
13 | |||
14 | # global LD options for all platforms | ||
15 | GLOBAL_LDOPTS="-Wl,-z,defs" | ||
13 | 16 | ||
14 | use_logf="#undef ROCKBOX_HAS_LOGF" | 17 | use_logf="#undef ROCKBOX_HAS_LOGF" |
15 | use_bootchart="#undef DO_BOOTCHART" | 18 | use_bootchart="#undef DO_BOOTCHART" |
@@ -3097,6 +3100,7 @@ sed > Makefile \ | |||
3097 | -e "s<@GCCOPTS@<${GCCOPTS}<g" \ | 3100 | -e "s<@GCCOPTS@<${GCCOPTS}<g" \ |
3098 | -e "s<@TARGET_INC@<${TARGET_INC}<g" \ | 3101 | -e "s<@TARGET_INC@<${TARGET_INC}<g" \ |
3099 | -e "s<@LDOPTS@<${LDOPTS}<g" \ | 3102 | -e "s<@LDOPTS@<${LDOPTS}<g" \ |
3103 | -e "s<@GLOBAL_LDOPTS@<${GLOBAL_LDOPTS}<g" \ | ||
3100 | -e "s<@LOADADDRESS@<${loadaddress}<g" \ | 3104 | -e "s<@LOADADDRESS@<${loadaddress}<g" \ |
3101 | -e "s<@EXTRADEF@<${extradefines}<g" \ | 3105 | -e "s<@EXTRADEF@<${extradefines}<g" \ |
3102 | -e "s<@APPSDIR@<${appsdir}<g" \ | 3106 | -e "s<@APPSDIR@<${appsdir}<g" \ |
@@ -3176,6 +3180,7 @@ export TARGET_INC=@TARGET_INC@ | |||
3176 | export LOADADDRESS=@LOADADDRESS@ | 3180 | export LOADADDRESS=@LOADADDRESS@ |
3177 | export SHARED_FLAG=@SHARED_FLAG@ | 3181 | export SHARED_FLAG=@SHARED_FLAG@ |
3178 | export LDOPTS=@LDOPTS@ | 3182 | export LDOPTS=@LDOPTS@ |
3183 | export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@ | ||
3179 | export GCCVER=@GCCVER@ | 3184 | export GCCVER=@GCCVER@ |
3180 | export GCCNUM=@GCCNUM@ | 3185 | export GCCNUM=@GCCNUM@ |
3181 | export UNAME=@UNAME@ | 3186 | export UNAME=@UNAME@ |
diff --git a/tools/root.make b/tools/root.make index e30b5b3c18..2b4dfb6bb2 100644 --- a/tools/root.make +++ b/tools/root.make | |||
@@ -164,13 +164,13 @@ $(BUILDDIR)/rockbox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(L | |||
164 | -L$(BUILDDIR)/firmware -lfirmware \ | 164 | -L$(BUILDDIR)/firmware -lfirmware \ |
165 | -L$(BUILDDIR)/lib -lskin_parser \ | 165 | -L$(BUILDDIR)/lib -lskin_parser \ |
166 | -L$(BUILDDIR)/apps/codecs $(VOICESPEEXLIB:lib%.a=-l%) \ | 166 | -L$(BUILDDIR)/apps/codecs $(VOICESPEEXLIB:lib%.a=-l%) \ |
167 | -lgcc $(BOOTBOXLDOPTS) \ | 167 | -lgcc $(BOOTBOXLDOPTS) $(GLOBAL_LDOPTS) \ |
168 | -T$(LINKRAM) -Wl,-Map,$(BUILDDIR)/rockbox.map | 168 | -T$(LINKRAM) -Wl,-Map,$(BUILDDIR)/rockbox.map |
169 | 169 | ||
170 | $(BUILDDIR)/rombox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LINKROM) | 170 | $(BUILDDIR)/rombox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LINKROM) |
171 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ | 171 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ |
172 | $(VOICESPEEXLIB) $(FIRMLIB) -lgcc -L$(BUILDDIR)/firmware \ | 172 | $(VOICESPEEXLIB) $(FIRMLIB) -lgcc $(GLOBAL_LDOPTS) \ |
173 | -T$(LINKROM) -Wl,-Map,$(BUILDDIR)/rombox.map | 173 | -L$(BUILDDIR)/firmware -T$(LINKROM) -Wl,-Map,$(BUILDDIR)/rombox.map |
174 | 174 | ||
175 | $(BUILDDIR)/rockbox.bin : $(BUILDDIR)/rockbox.elf | 175 | $(BUILDDIR)/rockbox.bin : $(BUILDDIR)/rockbox.elf |
176 | $(call PRINTS,OC $(@F))$(OC) $(if $(filter yes, $(USE_ELF)), -S -x, -O binary) $< $@ | 176 | $(call PRINTS,OC $(@F))$(OC) $(if $(filter yes, $(USE_ELF)), -S -x, -O binary) $< $@ |
diff --git a/uisimulator/uisimulator.make b/uisimulator/uisimulator.make index 219d890e9c..7efffe9b6c 100644 --- a/uisimulator/uisimulator.make +++ b/uisimulator/uisimulator.make | |||
@@ -28,7 +28,7 @@ $(SIMLIB): $$(SIMOBJ) $(UIBMP) | |||
28 | 28 | ||
29 | # SIMLIB needs to be linked twice for some reason | 29 | # SIMLIB needs to be linked twice for some reason |
30 | $(BUILDDIR)/$(BINARY): $$(OBJ) $(SIMLIB) $(VOICESPEEXLIB) $(FIRMLIB) $(SKINLIB) | 30 | $(BUILDDIR)/$(BINARY): $$(OBJ) $(SIMLIB) $(VOICESPEEXLIB) $(FIRMLIB) $(SKINLIB) |
31 | $(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(SIMLIB) $(LDOPTS) | 31 | $(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(SIMLIB) $(LDOPTS) $(GLOBAL_LDOPTS) |
32 | 32 | ||
33 | $(BUILDDIR)/uisimulator/%.o: $(ROOTDIR)/uisimulator/%.c | 33 | $(BUILDDIR)/uisimulator/%.o: $(ROOTDIR)/uisimulator/%.c |
34 | $(SILENT)mkdir -p $(dir $@) | 34 | $(SILENT)mkdir -p $(dir $@) |