X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=rules.mk;h=14171a0d307d52e83802ef65f4da1731a214d5f9;hb=e3d2699713f9533f3029ac6db4bd19a3aa8ccd61;hp=2e9e20d919f158ca84cbc4f3f74298563b8e733a;hpb=553f80893311bd7036d6433975381927aa177684;p=openwrt.git diff --git a/rules.mk b/rules.mk index 2e9e20d919..14171a0d30 100644 --- a/rules.mk +++ b/rules.mk @@ -14,7 +14,7 @@ endif include $(TOPDIR)/include/debug.mk include $(TOPDIR)/include/verbose.mk -TMP_DIR:=$(TOPDIR)/tmp +export TMP_DIR:=$(TOPDIR)/tmp GREP_OPTIONS= export GREP_OPTIONS @@ -38,6 +38,7 @@ ARCH:=$(subst i486,i386,$(subst i586,i386,$(subst i686,i386,$(call qstrip,$(CONF ARCH_PACKAGES:=$(call qstrip,$(CONFIG_TARGET_ARCH_PACKAGES)) BOARD:=$(call qstrip,$(CONFIG_TARGET_BOARD)) TARGET_OPTIMIZATION:=$(call qstrip,$(CONFIG_TARGET_OPTIMIZATION)) +export EXTRA_OPTIMIZATION:=$(call qstrip,$(CONFIG_EXTRA_OPTIMIZATION)) TARGET_SUFFIX=$(call qstrip,$(CONFIG_TARGET_SUFFIX)) BUILD_SUFFIX:=$(call qstrip,$(CONFIG_BUILD_SUFFIX)) SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR}) @@ -69,13 +70,6 @@ endif ifneq ($(filter -mdspr2,$(TARGET_OPTIMIZATION)),) ARCH_SUFFIX:=$(ARCH_SUFFIX)_dspr2 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 -endif ifdef CONFIG_HAS_SPE_FPU TARGET_SUFFIX:=$(TARGET_SUFFIX)spe endif @@ -127,9 +121,10 @@ BUILD_LOG_DIR:=$(TOPDIR)/logs PKG_INFO_DIR := $(STAGING_DIR)/pkginfo TARGET_PATH:=$(STAGING_DIR_HOST)/bin:$(subst $(space),:,$(filter-out .,$(filter-out ./,$(subst :,$(space),$(PATH))))) -TARGET_CFLAGS:=$(TARGET_OPTIMIZATION)$(if $(CONFIG_DEBUG), -g3) +TARGET_CFLAGS:=$(TARGET_OPTIMIZATION)$(if $(CONFIG_DEBUG), -g3) $(EXTRA_OPTIMIZATION) TARGET_CXXFLAGS = $(TARGET_CFLAGS) -TARGET_ASFLAGS = $(TARGET_CFLAGS) $(TARGET_ASFLAGS_OVERRIDE) +TARGET_ASFLAGS_DEFAULT = $(TARGET_CFLAGS) +TARGET_ASFLAGS = $(TARGET_ASFLAGS_DEFAULT) TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib ifneq ($(CONFIG_EXTERNAL_TOOLCHAIN),)