From c8535f27d140a2030cedf695a66595aae5b95c27 Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Wed, 12 Jan 2011 22:28:43 +0000 Subject: Switch coldfire builds over to new toolchain using gcc 4.5.2 and binutils 2.20.1 Retune codec compiler optimizations with new compiler. Overall speedup with aac and flac getting big speedups. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29042 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/demac/libdemac.make | 7 ++++++- apps/codecs/libalac/libalac.make | 2 +- apps/codecs/libatrac/libatrac.make | 13 +++++++++++++ apps/codecs/libfaad/libfaad.make | 6 +----- apps/codecs/libffmpegFLAC/libffmpegFLAC.make | 6 +----- apps/codecs/libmusepack/libmusepack.make | 6 +----- apps/codecs/libtta/libtta.make | 7 +------ apps/codecs/libwavpack/libwavpack.make | 2 +- apps/codecs/libwma/libwma.make | 2 -- apps/codecs/libwmapro/libwmapro.make | 2 +- tools/configure | 4 ++-- 11 files changed, 28 insertions(+), 29 deletions(-) diff --git a/apps/codecs/demac/libdemac.make b/apps/codecs/demac/libdemac.make index dcbd35c6b1..bf0f821de3 100644 --- a/apps/codecs/demac/libdemac.make +++ b/apps/codecs/demac/libdemac.make @@ -27,7 +27,12 @@ $(DEMACLIB): $(DEMACLIB_OBJ) $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null DEMACFLAGS = $(filter-out -O%,$(CODECFLAGS)) -DEMACFLAGS += -O3 + +ifeq ($(CPU),coldfire) + DEMACFLAGS += -O2 +else + DEMACFLAGS += -O3 +endif $(CODECDIR)/ape_free_iram.h: $(CODECDIR)/ape-pre.map $(call PRINTS,GEN $(@F))perl -an \ diff --git a/apps/codecs/libalac/libalac.make b/apps/codecs/libalac/libalac.make index c1b5d0acb1..b3b24cd2ee 100644 --- a/apps/codecs/libalac/libalac.make +++ b/apps/codecs/libalac/libalac.make @@ -22,7 +22,7 @@ ALACFLAGS = $(filter-out -O%,$(CODECFLAGS)) ifeq ($(CPU),arm) ALACFLAGS += -O2 else - ALACFLAGS += -O3 + ALACFLAGS += -O1 endif $(CODECDIR)/libalac/%.o: $(ROOTDIR)/apps/codecs/libalac/%.c diff --git a/apps/codecs/libatrac/libatrac.make b/apps/codecs/libatrac/libatrac.make index 01606e1f15..980f5873f6 100644 --- a/apps/codecs/libatrac/libatrac.make +++ b/apps/codecs/libatrac/libatrac.make @@ -16,3 +16,16 @@ OTHER_SRC += $(ATRACLIB_SRC) $(ATRACLIB): $(ATRACLIB_OBJ) $(SILENT)$(shell rm -f $@) $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null + +ATRACFLAGS = -I$(APPSDIR)/codecs/libatrac $(filter-out -O%,$(CODECFLAGS)) +# not tuned for arm +ifeq ($(CPU),coldfire) + ATRACFLAGS += -O2 +else + ATRACFLAGS += -O1 +endif + +$(CODECDIR)/libatrac/%.o: $(ROOTDIR)/apps/codecs/libatrac/%.c + $(SILENT)mkdir -p $(dir $@) + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(ATRACFLAGS) -c $< -o $@ + diff --git a/apps/codecs/libfaad/libfaad.make b/apps/codecs/libfaad/libfaad.make index a4207a67ec..a52e6f354a 100644 --- a/apps/codecs/libfaad/libfaad.make +++ b/apps/codecs/libfaad/libfaad.make @@ -20,11 +20,7 @@ $(FAADLIB): $(FAADLIB_OBJ) # libfaad is faster on ARM with -O2, use -O1 for other CPUs FAADFLAGS = -I$(APPSDIR)/codecs/libfaad $(filter-out -O%,$(CODECFLAGS)) -ifeq ($(CPU),arm) - FAADFLAGS += -O2 -else - FAADFLAGS += -O1 -endif +FAADFLAGS += -O2 $(CODECDIR)/libfaad/%.o: $(ROOTDIR)/apps/codecs/libfaad/%.c $(SILENT)mkdir -p $(dir $@) diff --git a/apps/codecs/libffmpegFLAC/libffmpegFLAC.make b/apps/codecs/libffmpegFLAC/libffmpegFLAC.make index aae18aebd2..912538530a 100644 --- a/apps/codecs/libffmpegFLAC/libffmpegFLAC.make +++ b/apps/codecs/libffmpegFLAC/libffmpegFLAC.make @@ -15,11 +15,7 @@ OTHER_SRC += $(FFMPEGFLACLIB_SRC) # libffmpegFLAC is faster on ARM-targets with -O2 than -O1 FFMPEGFLACFLAGS = -I$(APPSDIR)/codecs/libffmpegFLAC $(filter-out -O%,$(CODECFLAGS)) -ifeq ($(CPU),arm) - FFMPEGFLACFLAGS += -O2 -else - FFMPEGFLACFLAGS += -O1 -endif +FFMPEGFLACFLAGS += -O2 $(FFMPEGFLACLIB): $(FFMPEGFLACLIB_OBJ) $(SILENT)$(shell rm -f $@) diff --git a/apps/codecs/libmusepack/libmusepack.make b/apps/codecs/libmusepack/libmusepack.make index e975f002e4..3a4127e9c4 100644 --- a/apps/codecs/libmusepack/libmusepack.make +++ b/apps/codecs/libmusepack/libmusepack.make @@ -19,11 +19,7 @@ $(MUSEPACKLIB): $(MUSEPACKLIB_OBJ) # libmusepack is faster on ARM-targets with -O1 than -O2 MUSEPACKFLAGS = $(filter-out -O%,$(CODECFLAGS)) -I$(APPSDIR)/codecs/libmusepack -ifeq ($(CPU),arm) - MUSEPACKFLAGS += -O1 -else - MUSEPACKFLAGS += -O2 -endif +MUSEPACKFLAGS += -O1 $(CODECDIR)/libmusepack/%.o: $(ROOTDIR)/apps/codecs/libmusepack/%.c $(SILENT)mkdir -p $(dir $@) diff --git a/apps/codecs/libtta/libtta.make b/apps/codecs/libtta/libtta.make index d458ab78bc..7bd953e371 100644 --- a/apps/codecs/libtta/libtta.make +++ b/apps/codecs/libtta/libtta.make @@ -18,12 +18,7 @@ $(TTALIB): $(TTALIB_OBJ) $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null TTAFLAGS = $(filter-out -O%,$(CODECFLAGS)) - -ifeq ($(CPU),coldfire) - TTAFLAGS += -O3 -else - TTAFLAGS += -O2 -endif +TTAFLAGS += -O2 $(CODECDIR)/libtta/%.o: $(ROOTDIR)/apps/codecs/libtta/%.c $(SILENT)mkdir -p $(dir $@) diff --git a/apps/codecs/libwavpack/libwavpack.make b/apps/codecs/libwavpack/libwavpack.make index c016ac85c6..61430b55da 100644 --- a/apps/codecs/libwavpack/libwavpack.make +++ b/apps/codecs/libwavpack/libwavpack.make @@ -18,7 +18,7 @@ WAVPACKFLAGS = -I$(APPSDIR)/codecs/libwavpack $(filter-out -O%,$(CODECFLAGS)) ifeq ($(CPU),arm) WAVPACKFLAGS += -O3 else - WAVPACKFLAGS += -O2 + WAVPACKFLAGS += -O1 endif diff --git a/apps/codecs/libwma/libwma.make b/apps/codecs/libwma/libwma.make index 360245139d..66b315eca0 100644 --- a/apps/codecs/libwma/libwma.make +++ b/apps/codecs/libwma/libwma.make @@ -21,8 +21,6 @@ WMAFLAGS = -I$(APPSDIR)/codecs/libwma $(filter-out -O%,$(CODECFLAGS)) ifeq ($(MEMORYSIZE),2) WMAFLAGS += -Os -else ifeq ($(CPU),coldfire) - WMAFLAGS += -O3 else WMAFLAGS += -O2 endif diff --git a/apps/codecs/libwmapro/libwmapro.make b/apps/codecs/libwmapro/libwmapro.make index e54f8db71c..4dc52fa15b 100644 --- a/apps/codecs/libwmapro/libwmapro.make +++ b/apps/codecs/libwmapro/libwmapro.make @@ -20,7 +20,7 @@ $(WMAPROLIB): $(WMAPROLIB_OBJ) WMAPROFLAGS = -I$(APPSDIR)/codecs/libwmapro $(filter-out -O%,$(CODECFLAGS)) ifeq ($(CPU),coldfire) - WMAPROFLAGS += -O2 + WMAPROFLAGS += -O3 else WMAPROFLAGS += -O1 endif diff --git a/tools/configure b/tools/configure index 6a7eaeb28d..db10d1bf64 100755 --- a/tools/configure +++ b/tools/configure @@ -381,10 +381,10 @@ calmrisccc () { coldfirecc () { prefixtools m68k-elf- - GCCOPTS="$CCOPTS -m5206e -Wa\,-m5249 -malign-int -mstrict-align" + GCCOPTS="$CCOPTS -mcpu=5249 -malign-int -mstrict-align" GCCOPTIMIZE="-fomit-frame-pointer" endian="big" - gccchoice="3.4.6" + gccchoice="4.5.2" } arm7tdmicc () { -- cgit v1.2.3