From 5c545bdb365a78b8995ddfa441a6018f7ff3c011 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Thu, 2 Feb 2023 20:02:25 +0100 Subject: 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 --- include/package.mk | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'include') 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 -- cgit v1.2.3