Browse Source

set correct ABI in uClibc

Waldemar Brodkorb 13 years ago
parent
commit
1b211f269a
1 changed files with 15 additions and 0 deletions
  1. 15 0
      toolchain/uClibc/Makefile

+ 15 - 0
toolchain/uClibc/Makefile

@@ -42,6 +42,21 @@ $(WRKBUILD)/.headers:
 	$(SED) 's,^CROSS_COMPILE=.*,CROSS_COMPILE=$(TARGET_CROSS),g' $(WRKBUILD)/Rules.mak
 	$(SED) 's,^CROSS_COMPILE=.*,CROSS_COMPILE=$(TARGET_CROSS),g' $(WRKBUILD)/Rules.mak
 	sed -e 's^KERNEL_HEADERS.*$$KERNEL_HEADERS=\"${STAGING_TARGET_DIR}/usr/include\"' \
 	sed -e 's^KERNEL_HEADERS.*$$KERNEL_HEADERS=\"${STAGING_TARGET_DIR}/usr/include\"' \
 	    $(TOPDIR)/target/$(ADK_TARGET_ARCH)/$(UCLIBCCFG) >${WRKBUILD}/.config
 	    $(TOPDIR)/target/$(ADK_TARGET_ARCH)/$(UCLIBCCFG) >${WRKBUILD}/.config
+ifeq ($(ADK_TARGET_ABI_N64),y)
+	$(SED)  's/.*\(CONFIG_MIPS_N64_ABI\).*/\1=y/' ${WRKBUILD}/.config
+	$(SED)  's/.*\(CONFIG_MIPS_O32_ABI\).*/\1 is not set/' ${WRKBUILD}/.config
+	$(SED)  's/.*\(CONFIG_MIPS_N32_ABI\).*/\1 is not set/' ${WRKBUILD}/.config
+endif
+ifeq ($(ADK_TARGET_ABI_N32),y)
+	$(SED)  's/.*\(CONFIG_MIPS_N32_ABI\).*/\1=y/' ${WRKBUILD}/.config
+	$(SED)  's/.*\(CONFIG_MIPS_O32_ABI\).*/\1 is not set/' ${WRKBUILD}/.config
+	$(SED)  's/.*\(CONFIG_MIPS_N64_ABI\).*/\1 is not set/' ${WRKBUILD}/.config
+endif
+ifeq ($(ADK_TARGET_ABI_O32),y)
+	$(SED)  's/.*\(CONFIG_MIPS_O32_ABI\).*/\1=y/' ${WRKBUILD}/.config
+	$(SED)  's/.*\(CONFIG_MIPS_N32_ABI\).*/\1 is not set/' ${WRKBUILD}/.config
+	$(SED)  's/.*\(CONFIG_MIPS_N64_ABI\).*/\1 is not set/' ${WRKBUILD}/.config
+endif
 ifneq ($(ADK_DEBUG),)
 ifneq ($(ADK_DEBUG),)
 	$(SED) 's,DOSTRIP,DODEBUG,' ${WRKBUILD}/.config
 	$(SED) 's,DOSTRIP,DODEBUG,' ${WRKBUILD}/.config
 endif
 endif