summaryrefslogtreecommitdiffstats
path: root/rules.mk
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2013-04-05 12:36:12 +0000
committerFlorian Fainelli <florian@openwrt.org>2013-04-05 12:36:12 +0000
commit9e1d2c15d905cf210760d9d4f654f91a5d6c5f42 (patch)
tree524e728f41011bd461bdd2e729ccbcf7e892f217 /rules.mk
parentf223d0927ecc0e3b1b66df010a449543a6e5c6a4 (diff)
downloadmaster-31e0f0ae-9e1d2c15d905cf210760d9d4f654f91a5d6c5f42.tar.gz
master-31e0f0ae-9e1d2c15d905cf210760d9d4f654f91a5d6c5f42.tar.bz2
master-31e0f0ae-9e1d2c15d905cf210760d9d4f654f91a5d6c5f42.zip
buildroot: allow enabling MIPS16 user-space build
Enabling MIPS16 is made conditional on advertising the "mips16" feature for a specific target since it requires support from the CPU (HAS_MIPS16) and the actual use of MIPS16 for building packages (USE_MIPS16). Signed-off-by: Florian Fainelli <florian@openwrt.org> SVN-Revision: 36202
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/rules.mk b/rules.mk
index 59ab50b922..56129917e4 100644
--- a/rules.mk
+++ b/rules.mk
@@ -63,6 +63,9 @@ endif
ifneq ($(filter -mips%r2,$(TARGET_OPTIMIZATION)),)
ARCH_SUFFIX:=_r2
endif
+ifdef CONFIG_USE_MIPS16
+ TARGET_OPTIMIZATION+= -minterlink-mips16 -mips16
+endif
ifneq ($(findstring -mips16,$(TARGET_OPTIMIZATION)),)
TARGET_ASFLAGS_OVERRIDE:=-mno-mips16
ARCH_SUFFIX:= $(ARCH_SUFFIX)_m16