aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/gcc/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-10-27 01:11:35 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-10-27 01:11:35 +0000
commit46cc3f164d866ce62b7957809333c8b587ff5558 (patch)
treee13f0eac33c0dff1a01cc7c73ebf3f49c0b87d45 /toolchain/gcc/Makefile
parentbc59e3da516f95c2d02636fcde06dd7a2e022a84 (diff)
downloadupstream-46cc3f164d866ce62b7957809333c8b587ff5558.tar.gz
upstream-46cc3f164d866ce62b7957809333c8b587ff5558.tar.bz2
upstream-46cc3f164d866ce62b7957809333c8b587ff5558.zip
gcc: compile libgcc and libstdc++ with -O2 instead of -Os on power pc to avoid generating references to gpr save/restore functions which cannot yet be resolved at this point
SVN-Revision: 18177
Diffstat (limited to 'toolchain/gcc/Makefile')
-rw-r--r--toolchain/gcc/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 3b31127b4a..77243c5fa4 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -151,6 +151,10 @@ GCC_CONFIGURE_STAGE2:= \
--disable-tls \
--with-slibdir=$(TOOLCHAIN_DIR)/lib \
+ifdef CONFIG_powerpc
+ TARGET_CFLAGS := $(patsubst -Os,-O2,$(TARGET_CFLAGS))
+endif
+
GCC_MAKE:= \
export SHELL="$(BASH)"; \
$(MAKE) \