summaryrefslogtreecommitdiff
path: root/include/package.mk
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
commita1a5f59ea358fc35805f003466c98f08f5299e9d (patch)
tree57465ec975a600a13a602da95c0aa72cb440662b /include/package.mk
parent8b8875b305e3e36153f83d08c68596fe0303efa4 (diff)
downloadmtk-20170518-a1a5f59ea358fc35805f003466c98f08f5299e9d.zip
mtk-20170518-a1a5f59ea358fc35805f003466c98f08f5299e9d.tar.gz
mtk-20170518-a1a5f59ea358fc35805f003466c98f08f5299e9d.tar.bz2
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> SVN-Revision: 37770
Diffstat (limited to 'include/package.mk')
-rw-r--r--include/package.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/package.mk b/include/package.mk
index a4f353b..02893b8 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