summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-03-06 10:56:12 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2014-03-06 10:56:12 +0100
commit8f60440edc30c41982916877253f73f348a12026 (patch)
treed77b920162ab6762f5e9bcd0216e0f78e070a6dd /toolchain
parent8bc8747d869827a2b4c4573baeea45324bafd5c7 (diff)
cleanup uclibc.config mess. just use one and edit via sed
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/uClibc/Makefile36
1 files changed, 17 insertions, 19 deletions
diff --git a/toolchain/uClibc/Makefile b/toolchain/uClibc/Makefile
index 4ee9af510..b935a2f53 100644
--- a/toolchain/uClibc/Makefile
+++ b/toolchain/uClibc/Makefile
@@ -14,30 +14,28 @@ ifeq (${ADK_MAKE_PARALLEL},y)
UCLIBC_MAKEOPTS+= -j${ADK_MAKE_JOBS}
endif
-UCLIBCCFG=uclibc.config
+$(WRKBUILD)/.headers:
+ $(SED) 's,^CROSS_COMPILE=.*,CROSS_COMPILE=$(TARGET_CROSS),g' $(WRKBUILD)/Rules.mak
+ sed -e 's^KERNEL_HEADERS.*$$KERNEL_HEADERS=\"${STAGING_TARGET_DIR}/usr/include\"' \
+ $(TOPDIR)/target/$(ADK_TARGET_ARCH)/uclibc.config >${WRKBUILD}/.config
ifeq ($(ADK_TARGET_ENDIAN),little)
-ifeq ($(ADK_CPU_MIPS64),y)
-UCLIBCCFG=uclibc.config.little.mips64
+ $(SED) 's/.*\(ARCH_LITTLE_ENDIAN\).*/\1=y/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(ARCH_WANTS_LITTLE_ENDIAN\).*/\1=y/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(ARCH_BIG_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(ARCH_WANTS_BIG_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config
else
-UCLIBCCFG=uclibc.config.little
+ $(SED) 's/.*\(ARCH_BIG_ENDIAN\).*/\1=y/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(ARCH_WANTS_BIG_ENDIAN\).*/\1=y/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(ARCH_LITTLE_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(ARCH_WANTS_LITTLE_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config
endif
-endif
-ifeq ($(ADK_TARGET_ENDIAN),big)
-ifeq ($(ADK_CPU_MIPS64),y)
-UCLIBCCFG=uclibc.config.big.mips64
+ifeq ($(ADK_LINUX_64),y)
+ $(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS64\).*/\1=y/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS32\).*/# \1 is not set/' ${WRKBUILD}/.config
else
-UCLIBCCFG=uclibc.config.big
-endif
+ $(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS32\).*/\1=y/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS64\).*/# \1 is not set/' ${WRKBUILD}/.config
endif
-
-ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
-UCLIBCCFG=uclibc.config.little.mips64
-endif
-
-$(WRKBUILD)/.headers:
- $(SED) 's,^CROSS_COMPILE=.*,CROSS_COMPILE=$(TARGET_CROSS),g' $(WRKBUILD)/Rules.mak
- sed -e 's^KERNEL_HEADERS.*$$KERNEL_HEADERS=\"${STAGING_TARGET_DIR}/usr/include\"' \
- $(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