toolchain/musl: fix build issues on mac os x
[openwrt/openwrt.git] / rules.mk
index d9d38374fa8f7018ad34d3de99faa77cdf444e00..b9510057b64c08a18729367cb406b1fd7689ec6d 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -63,6 +63,12 @@ endif
 ifneq ($(filter -mips%r2,$(TARGET_OPTIMIZATION)),)
   ARCH_SUFFIX:=_r2
 endif
+ifneq ($(filter -mdsp,$(TARGET_OPTIMIZATION)),)
+  ARCH_SUFFIX:=$(ARCH_SUFFIX)_dsp
+endif
+ifneq ($(filter -mdspr2,$(TARGET_OPTIMIZATION)),)
+  ARCH_SUFFIX:=$(ARCH_SUFFIX)_dspr2
+endif
 ifdef CONFIG_USE_MIPS16
    TARGET_OPTIMIZATION+= -minterlink-mips16 -mips16
 endif
@@ -73,6 +79,11 @@ endif
 ifdef CONFIG_HAS_SPE_FPU
   TARGET_SUFFIX:=$(TARGET_SUFFIX)spe
 endif
+ifdef CONFIG_MIPS64_ABI
+  ifneq ($(CONFIG_MIPS64_ABI_O32),y)
+     ARCH_SUFFIX:=$(ARCH_SUFFIX)_$(subst ",,$(CONFIG_MIPS64_ABI))
+  endif
+endif
 
 DL_DIR:=$(if $(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(TOPDIR)/dl)
 BIN_DIR:=$(TOPDIR)/bin/$(BOARD)