aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-03-14 03:17:06 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-03-14 03:17:06 +0000
commit019e6e2d31c2ca7ee9619e999bc2ccd8ae23e9b9 (patch)
tree6c94165b9cfec5329ff554b23efbaa04b1d7bb86 /include
parentbf1673f285dd397f8f18a4d7ee1c8c4ccb784535 (diff)
downloadupstream-019e6e2d31c2ca7ee9619e999bc2ccd8ae23e9b9.tar.gz
upstream-019e6e2d31c2ca7ee9619e999bc2ccd8ae23e9b9.tar.bz2
upstream-019e6e2d31c2ca7ee9619e999bc2ccd8ae23e9b9.zip
move cflags default setting to target makefiles
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14866 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r--include/target.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/target.mk b/include/target.mk
index ace3db0ffd..5d8baeaeb6 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -150,6 +150,13 @@ ifeq ($(DUMP),1)
# remove duplicates
FEATURES:=$(sort $(FEATURES))
endif
+ DEFAULT_CFLAGS_i386=-O2 -pipe -march=i486 -funit-at-a-time
+ DEFAULT_CFLAGS_x86_64=-O2 -pipe -march=athlon64 -funit-at-a-time
+ DEFAULT_CFLAGS_mips=-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time
+ DEFAULT_CFLAGS_mipsel=$(DEFAULT_CFLAGS_mips)
+ DEFAULT_CFLAGS_arm=-Os -pipe -march=armv5te -mtune=xscale -funit-at-a-time
+ DEFAULT_CFLAGS_armeb=$(DEFAULT_CFLAGS_arm)
+ DEFAULT_CFLAGS=$(if $(DEFAULT_CFLAGS_$(ARCH)),$(DEFAULT_CFLAGS_$(ARCH)),-Os -pipe -funit-at-a-time)
endif
define BuildTargets/DumpCurrent
@@ -163,6 +170,7 @@ define BuildTargets/DumpCurrent
echo 'Target-Arch: $(ARCH)'; \
echo 'Target-Features: $(FEATURES)'; \
echo 'Target-Depends: $(DEPENDS)'; \
+ echo 'Target-Optimization: $(if $(CFLAGS),$(CFLAGS),$(DEFAULT_CFLAGS))'; \
echo 'Linux-Version: $(LINUX_VERSION)'; \
echo 'Linux-Release: $(LINUX_RELEASE)'; \
echo 'Linux-Kernel-Arch: $(LINUX_KARCH)'; \