summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2013-04-05 12:35:53 +0000
committerFlorian Fainelli <florian@openwrt.org>2013-04-05 12:35:53 +0000
commit5b3445c60bb23b7414119482fb784f68fbcc82db (patch)
tree6b2b3bad8c475920b7ba4eb77f702fa272ee613b
parent35d716fbbba0f521d7b1cbdaccba6278341165f2 (diff)
downloadmtk-20170518-5b3445c60bb23b7414119482fb784f68fbcc82db.zip
mtk-20170518-5b3445c60bb23b7414119482fb784f68fbcc82db.tar.gz
mtk-20170518-5b3445c60bb23b7414119482fb784f68fbcc82db.tar.bz2
rules.mk: Create TARGET_ASFLAGS; force -mno-mips16
Create and use a TARGET_ASFLAGS, defaulting to TARGET_CFLAGS. MIPS .S files reasonably assume they are not in mips16 mode. Because "-mips16 -mno-mips16" results in -mno-mips16, I can append that to the TARGET_ASFLAGS. This should be done with $(filter-out)? Signed-off-by: Jay Carlson <nop@nop.com> Signed-off-by: Florian Fainelli <florian@openwrt.org> SVN-Revision: 36197
-rw-r--r--rules.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/rules.mk b/rules.mk
index 17b71f9..ae7a840 100644
--- a/rules.mk
+++ b/rules.mk
@@ -63,6 +63,9 @@ endif
ifneq ($(filter -mips%r2,$(TARGET_OPTIMIZATION)),)
ARCH_SUFFIX:=_r2
endif
+ifneq ($(findstring -mips16,$(TARGET_OPTIMIZATION)),)
+ TARGET_ASFLAGS_OVERRIDE:=-mno-mips16
+endif
ifdef CONFIG_HAS_SPE_FPU
TARGET_SUFFIX:=$(TARGET_SUFFIX)spe
endif
@@ -111,6 +114,7 @@ PKG_INFO_DIR := $(STAGING_DIR)/pkginfo
TARGET_PATH:=$(STAGING_DIR_HOST)/bin:$(subst $(space),:,$(filter-out .,$(filter-out ./,$(subst :,$(space),$(PATH)))))
TARGET_CFLAGS:=$(TARGET_OPTIMIZATION)$(if $(CONFIG_DEBUG), -g3)
TARGET_CXXFLAGS = $(TARGET_CFLAGS)
+TARGET_ASFLAGS = $(TARGET_CFLAGS) $(TARGET_ASFLAGS_OVERRIDE)
TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
ifneq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
@@ -211,7 +215,7 @@ endif
TARGET_CONFIGURE_OPTS = \
AR=$(TARGET_CROSS)ar \
- AS="$(TARGET_CC) -c $(TARGET_CFLAGS)" \
+ AS="$(TARGET_CC) -c $(TARGET_ASFLAGS)" \
LD=$(TARGET_CROSS)ld \
NM=$(TARGET_CROSS)nm \
CC="$(TARGET_CC)" \