aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndre Heider <a.heider@gmail.com>2023-02-02 20:02:25 +0100
committerChristian Marangi <ansuelsmth@gmail.com>2023-03-21 18:28:22 +0100
commit5c545bdb365a78b8995ddfa441a6018f7ff3c011 (patch)
treef361776c080f76a400c46c51f221ccd61678beec /include
parent0a44c579a1ab3f699ad84728cc6cde78c99ba1d1 (diff)
downloadupstream-5c545bdb365a78b8995ddfa441a6018f7ff3c011.tar.gz
upstream-5c545bdb365a78b8995ddfa441a6018f7ff3c011.tar.bz2
upstream-5c545bdb365a78b8995ddfa441a6018f7ff3c011.zip
treewide: replace PKG_USE_MIPS16:=0 with PKG_BUILD_FLAGS:=no-mips16
Keep backwards compatibility via PKG_USE_MIPS16 for now, as this is used in all package feeds. Signed-off-by: Andre Heider <a.heider@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/package.mk21
1 files changed, 13 insertions, 8 deletions
diff --git a/include/package.mk b/include/package.mk
index 8d14c17dbd..a1717a603d 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -11,7 +11,6 @@ include $(INCLUDE_DIR)/download.mk
PKG_BUILD_DIR ?= $(BUILD_DIR)/$(if $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install
PKG_BUILD_PARALLEL ?=
-PKG_USE_MIPS16 ?= 1
PKG_SKIP_DOWNLOAD=$(USE_SOURCE_DIR)$(USE_GIT_TREE)$(USE_GIT_SRC_CHECKOUT)
MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) $(if $(filter 3.% 4.0 4.1,$(MAKE_VERSION)),-j))
@@ -23,16 +22,15 @@ PKG_JOBS?=-j1
else
PKG_JOBS?=$(if $(PKG_BUILD_PARALLEL),$(MAKE_J),-j1)
endif
-ifdef CONFIG_USE_MIPS16
- ifeq ($(strip $(PKG_USE_MIPS16)),1)
- TARGET_ASFLAGS_DEFAULT = $(filter-out -mips16 -minterlink-mips16,$(TARGET_CFLAGS))
- TARGET_CFLAGS += -mips16 -minterlink-mips16
- endif
-endif
PKG_BUILD_FLAGS?=
+# TODO remove this when all packages moved to PKG_BUILD_FLAGS=no-mips16
+PKG_USE_MIPS16?=1
+ifneq ($(strip $(PKG_USE_MIPS16)),1)
+ PKG_BUILD_FLAGS+=no-mips16
+endif
-__unknown_flags=$(filter-out no-iremap,$(PKG_BUILD_FLAGS))
+__unknown_flags=$(filter-out no-iremap no-mips16,$(PKG_BUILD_FLAGS))
ifneq ($(__unknown_flags),)
$(error unknown PKG_BUILD_FLAGS: $(__unknown_flags))
endif
@@ -46,6 +44,13 @@ ifeq ($(call pkg_build_flag,iremap,1),1)
IREMAP_CFLAGS = $(call iremap,$(PKG_BUILD_DIR),$(notdir $(PKG_BUILD_DIR)))
TARGET_CFLAGS += $(IREMAP_CFLAGS)
endif
+ifdef CONFIG_USE_MIPS16
+ ifeq ($(call pkg_build_flag,mips16,1),1)
+ TARGET_ASFLAGS_DEFAULT = $(filter-out -mips16 -minterlink-mips16,$(TARGET_CFLAGS))
+ TARGET_CFLAGS += -mips16 -minterlink-mips16
+ TARGET_CXXFLAGS += -mips16 -minterlink-mips16
+ endif
+endif
include $(INCLUDE_DIR)/hardening.mk
include $(INCLUDE_DIR)/prereq.mk