aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-08-14 13:02:29 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-08-14 13:02:29 +0000
commit64584aa1fcecfa733e4ef83d294280bce9f2922b (patch)
treef0eedc5fad943b44693a84a35e5c58140e6c5919 /include
parentec784b73562dc5afc0f6badb5b63fe02e58d237a (diff)
downloadupstream-64584aa1fcecfa733e4ef83d294280bce9f2922b.tar.gz
upstream-64584aa1fcecfa733e4ef83d294280bce9f2922b.tar.bz2
upstream-64584aa1fcecfa733e4ef83d294280bce9f2922b.zip
build: decouple the mips16 support flag from the toolchain
Add the flags from package.mk instead, and leave libc and gcc unaffected. Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37770 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r--include/package.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/package.mk b/include/package.mk
index a4f353be95..02893b8f66 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -13,6 +13,7 @@ PKG_BUILD_DIR ?= $(BUILD_DIR)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install
PKG_MD5SUM ?= unknown
PKG_BUILD_PARALLEL ?=
+PKG_USE_MIPS16 ?= 1
ifneq ($(CONFIG_PKG_BUILD_USE_JOBSERVER),)
MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) -j)
@@ -26,6 +27,12 @@ else
PKG_JOBS?=$(if $(PKG_BUILD_PARALLEL)$(CONFIG_PKG_DEFAULT_PARALLEL),\
$(if $(CONFIG_PKG_BUILD_PARALLEL),$(MAKE_J),-j1),-j1)
endif
+ifdef CONFIG_HAS_MIPS16
+ ifeq ($(strip $(PKG_USE_MIPS16)),1)
+ TARGET_ASFLAGS_DEFAULT = $(filter-out -mips16 -minterlink-mips16,$(TARGET_CFLAGS))
+ TARGET_CFLAGS += -mips16 -minterlink-mips16
+ endif
+endif
include $(INCLUDE_DIR)/prereq.mk
include $(INCLUDE_DIR)/host.mk