X-Git-Url: http://git.ozo.com/?p=openwrt%2F.git;a=blobdiff_plain;f=toolchain%2Fgcc%2Fcommon.mk;h=6e0edfb36a21061e9d39f90e49bf0b6bfb689085;hp=6e8767f707b7927b95a01ed66dde4da70ed71fee;hb=4cf991bedb4cbf42fd60af52a730bf52461c7161;hpb=8dcc1087602e2dd606e4f6e81a06aee62cfd4f4c diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index 6e8767f707..6e0edfb36a 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -170,6 +170,11 @@ ifeq ($(CONFIG_arm),y) --with-fpu=$(word 2, $(subst +, ",$(CONFIG_CPU_TYPE))) \ --with-float=hard endif + + # Do not let TARGET_CFLAGS get poisoned by extra CPU optimization flags + # that do not belong here. The cpu,fpu type should be specified via + # --with-cpu and --with-fpu for ARM and not CFLAGS. + TARGET_CFLAGS:=$(filter-out -m%,$(call qstrip,$(TARGET_CFLAGS))) endif ifeq ($(CONFIG_TARGET_x86)$(CONFIG_USE_GLIBC)$(CONFIG_INSTALL_GCCGO),yyy)