diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-09-07 19:21:57 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-09-07 19:21:57 +0000 |
commit | 6a989b8d4dec4750ad474598bd52897381d2f3cb (patch) | |
tree | 8837336fa974b64a91c28d2b6628b471962d1da1 | |
parent | 28c4f2a84e8b87392dcfff8200fbbc10d5c24adf (diff) | |
download | rockbox-6a989b8d4dec4750ad474598bd52897381d2f3cb.tar.gz rockbox-6a989b8d4dec4750ad474598bd52897381d2f3cb.zip |
Submit FS#12258. Do not use '-ffunction-sections' and '-fdata-sections' when compiling. Fixes compiler warnings for mingw and cygwin simulatior builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30468 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/codecs/lib/libcodec.make | 7 | ||||
-rw-r--r-- | apps/codecs/lib/tlsf/libtlsf.make | 7 | ||||
-rw-r--r-- | apps/plugins/plugins.make | 9 |
3 files changed, 20 insertions, 3 deletions
diff --git a/apps/codecs/lib/libcodec.make b/apps/codecs/lib/libcodec.make index c1858dcd6c..ca9b2c4fe2 100644 --- a/apps/codecs/lib/libcodec.make +++ b/apps/codecs/lib/libcodec.make | |||
@@ -16,7 +16,7 @@ $(CODECLIB): $(CODECLIB_OBJ) | |||
16 | $(SILENT)$(shell rm -f $@) | 16 | $(SILENT)$(shell rm -f $@) |
17 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null | 17 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null |
18 | 18 | ||
19 | CODECLIBFLAGS = $(filter-out -O%,$(CODECFLAGS)) -ffunction-sections | 19 | CODECLIBFLAGS = $(filter-out -O%,$(CODECFLAGS)) |
20 | 20 | ||
21 | ifeq ($(MEMORYSIZE),2) | 21 | ifeq ($(MEMORYSIZE),2) |
22 | CODECLIBFLAGS += -Os | 22 | CODECLIBFLAGS += -Os |
@@ -26,6 +26,11 @@ else | |||
26 | CODECLIBFLAGS += -O1 | 26 | CODECLIBFLAGS += -O1 |
27 | endif | 27 | endif |
28 | 28 | ||
29 | # Do not use '-ffunction-sections' when compiling sdl-sim | ||
30 | ifneq ($(findstring sdl-sim, $(APP_TYPE)), sdl-sim) | ||
31 | CODECLIBFLAGS += -ffunction-sections | ||
32 | endif | ||
33 | |||
29 | $(CODECDIR)/lib/%.o: $(ROOTDIR)/apps/codecs/lib/%.c | 34 | $(CODECDIR)/lib/%.o: $(ROOTDIR)/apps/codecs/lib/%.c |
30 | $(SILENT)mkdir -p $(dir $@) | 35 | $(SILENT)mkdir -p $(dir $@) |
31 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \ | 36 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \ |
diff --git a/apps/codecs/lib/tlsf/libtlsf.make b/apps/codecs/lib/tlsf/libtlsf.make index 7d37d29b21..2072a4566e 100644 --- a/apps/codecs/lib/tlsf/libtlsf.make +++ b/apps/codecs/lib/tlsf/libtlsf.make | |||
@@ -16,12 +16,17 @@ $(TLSFLIB): $(TLSFLIB_OBJ) | |||
16 | $(SILENT)$(shell rm -f $@) | 16 | $(SILENT)$(shell rm -f $@) |
17 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null | 17 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null |
18 | 18 | ||
19 | TLSFLIBFLAGS = $(CODECFLAGS) -ffunction-sections | 19 | TLSFLIBFLAGS = $(CODECFLAGS) |
20 | 20 | ||
21 | ifdef APP_TYPE | 21 | ifdef APP_TYPE |
22 | TLSFLIBFLAGS += -DTLSF_STATISTIC=1 | 22 | TLSFLIBFLAGS += -DTLSF_STATISTIC=1 |
23 | endif | 23 | endif |
24 | 24 | ||
25 | # Do not use '-ffunction-sections' when compiling sdl-sim | ||
26 | ifneq ($(findstring sdl-sim, $(APP_TYPE)), sdl-sim) | ||
27 | TLSFLIBFLAGS += -ffunction-sections | ||
28 | endif | ||
29 | |||
25 | $(CODECDIR)/lib/tlsf/src/%.o: $(APPSDIR)/codecs/lib/tlsf/src/%.c | 30 | $(CODECDIR)/lib/tlsf/src/%.o: $(APPSDIR)/codecs/lib/tlsf/src/%.c |
26 | $(SILENT)mkdir -p $(dir $@) | 31 | $(SILENT)mkdir -p $(dir $@) |
27 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \ | 32 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \ |
diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make index 0c667aaf24..41d2307682 100644 --- a/apps/plugins/plugins.make +++ b/apps/plugins/plugins.make | |||
@@ -87,10 +87,17 @@ $(BUILDDIR)/credits.raw credits.raw: $(DOCSDIR)/CREDITS | |||
87 | # special dependencies | 87 | # special dependencies |
88 | $(BUILDDIR)/apps/plugins/wav2wv.rock: $(BUILDDIR)/apps/codecs/libwavpack.a $(PLUGINLIB) | 88 | $(BUILDDIR)/apps/plugins/wav2wv.rock: $(BUILDDIR)/apps/codecs/libwavpack.a $(PLUGINLIB) |
89 | 89 | ||
90 | # Do not use '-ffunction-sections' and '-fdata-sections' when compiling sdl-sim | ||
91 | ifeq ($(findstring sdl-sim, $(APP_TYPE)), sdl-sim) | ||
92 | PLUGINLIBFLAGS = $(PLUGINFLAGS) | ||
93 | else | ||
94 | PLUGINLIBFLAGS = $(PLUGINFLAGS) -ffunction-sections -fdata-sections | ||
95 | endif | ||
96 | |||
90 | # special pattern rule for compiling plugin lib (with function and data sections) | 97 | # special pattern rule for compiling plugin lib (with function and data sections) |
91 | $(BUILDDIR)/apps/plugins/lib/%.o: $(ROOTDIR)/apps/plugins/lib/%.c | 98 | $(BUILDDIR)/apps/plugins/lib/%.o: $(ROOTDIR)/apps/plugins/lib/%.c |
92 | $(SILENT)mkdir -p $(dir $@) | 99 | $(SILENT)mkdir -p $(dir $@) |
93 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINFLAGS) -ffunction-sections -fdata-sections -c $< -o $@ | 100 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINLIBFLAGS) -c $< -o $@ |
94 | 101 | ||
95 | # special pattern rule for compiling plugins with extra flags | 102 | # special pattern rule for compiling plugins with extra flags |
96 | $(BUILDDIR)/apps/plugins/%.o: $(ROOTDIR)/apps/plugins/%.c | 103 | $(BUILDDIR)/apps/plugins/%.o: $(ROOTDIR)/apps/plugins/%.c |