summaryrefslogtreecommitdiff
path: root/toolchain/uclibc
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-02-20 11:36:02 -0600
committerWaldemar Brodkorb <wbx@openadk.org>2015-02-20 11:36:13 -0600
commita3f2ba1b546e90bcbc863560823f62884ff5b4f7 (patch)
treeeac90d1fcb0a70659a778a0e805d74ecbeeda35b /toolchain/uclibc
parent164f50489ad76684ec2155b66e1ecae52b95dd94 (diff)
sync with uClibc-ng Makefile changes
Diffstat (limited to 'toolchain/uclibc')
-rw-r--r--toolchain/uclibc/Makefile76
1 files changed, 50 insertions, 26 deletions
diff --git a/toolchain/uclibc/Makefile b/toolchain/uclibc/Makefile
index ff227dc88..57b615177 100644
--- a/toolchain/uclibc/Makefile
+++ b/toolchain/uclibc/Makefile
@@ -16,6 +16,24 @@ TARGET_CFLAGS:=$(filter-out -mtext-section-literals,$(TARGET_CFLAGS))
#UCLIBC_MAKEOPTS+= -j${ADK_MAKE_JOBS}
#endif
+ifeq ($(ADK_TARGET_HARD_FLOAT),y)
+ifeq ($(ADK_TARGET_ARCH_ARM),y)
+TARGET_CFLAGS+= -Wa,-mfloat-abi=hard
+endif
+ifeq ($(ADK_TARGET_ARCH_MIPS),y)
+TARGET_CFLAGS+= -Wa,-mhard-float
+endif
+endif
+
+ifeq ($(ADK_TARGET_SOFT_FLOAT),y)
+ifeq ($(ADK_TARGET_ARCH_ARM),y)
+TARGET_CFLAGS+= -Wa,-mfloat-abi=soft
+endif
+ifeq ($(ADK_TARGET_ARCH_MIPS),y)
+TARGET_CFLAGS+= -Wa,-msoft-float
+endif
+endif
+
$(WRKBUILD)/.headers:
$(SED) 's,^CROSS_COMPILE=.*,CROSS_COMPILE=$(TARGET_CROSS),g' $(WRKBUILD)/Rules.mak
PATH='$(HOST_PATH)' sed -e 's^KERNEL_HEADERS.*$$KERNEL_HEADERS=\"${STAGING_TARGET_DIR}/usr/include\"' \
@@ -31,6 +49,14 @@ else
$(SED) 's/.*\(ARCH_LITTLE_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config
$(SED) 's/.*\(ARCH_WANTS_LITTLE_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config
endif
+ifeq ($(ADK_TARGET_SOFT_FLOAT),y)
+ $(SED) 's/.*\(UCLIBC_HAS_FPU\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(UCLIBC_HAS_SOFT_FLOAT\).*/#\1=y/' ${WRKBUILD}/.config
+endif
+ifeq ($(ADK_TARGET_HARD_FLOAT),y)
+ $(SED) 's/.*\(UCLIBC_HAS_FPU\).*/\1=y/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(UCLIBC_HAS_SOFT_FLOAT\).*/# \1 is not set/' ${WRKBUILD}/.config
+endif
ifeq ($(ADK_TARGET_UCLINUX),y)
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/\1=y/' ${WRKBUILD}/.config
$(SED) 's/.*\(ARCH_USE_MMU\).*/# \1 is not set/' ${WRKBUILD}/.config
@@ -55,28 +81,36 @@ endif
# architecture specific options
# arm
ifeq ($(ADK_TARGET_ARCH_ARM),y)
-ifeq ($(ADK_TARGET_ABI_EABI),y)
- $(SED) 's/.*\(UCLIBC_HAS_FPU\).*/# \1 is not set/' ${WRKBUILD}/.config
- $(SED) 's/.*\(UCLIBC_HAS_SOFT_FLOAT\).*/#\1=y/' ${WRKBUILD}/.config
-
+ifeq ($(ADK_TARGET_ARCH_ARM_WITH_THUMB),y)
+ $(SED) 's/.*\(COMPILE_IN_THUMB_MODE\).*/\1=y/' ${WRKBUILD}/.config
endif
-ifeq ($(ADK_TARGET_ABI_EABIHF),y)
- $(SED) 's/.*\(UCLIBC_HAS_FPU\).*/\1=y/' ${WRKBUILD}/.config
- $(SED) 's/.*\(UCLIBC_HAS_SOFT_FLOAT\).*/# \1 is not set/' ${WRKBUILD}/.config
endif
-ifeq ($(ADK_LINUX_ARM_WITH_THUMB),y)
- $(SED) 's/.*\(COMPILE_IN_THUMB_MODE\).*/\1=y/' ${WRKBUILD}/.config
+# mips
+ifeq ($(ADK_TARGET_ARCH_MIPS),y)
+ifeq ($(ADK_CPU_MIPS32R2),y)
+ $(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS32 \).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS32R2\).*/\1=y/' ${WRKBUILD}/.config
endif
endif
-# mips/mips64
-ifeq ($(ADK_TARGET_ARCH_MIPS64),y)
- $(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS64\).*/\1=y/' ${WRKBUILD}/.config
- $(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS32\).*/# \1 is not set/' ${WRKBUILD}/.config
+# x86
+ifeq ($(ADK_TARGET_ARCH_X86),y)
+ifeq ($(ADK_CPU_I486),y)
+ $(SED) 's/.*\(CONFIG_686\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_586\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_486\).*/\1=y/' ${WRKBUILD}/.config
endif
-ifeq ($(ADK_TARGET_ARCH_MIPS),y)
- $(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS32\).*/\1=y/' ${WRKBUILD}/.config
- $(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS64\).*/# \1 is not set/' ${WRKBUILD}/.config
+ifeq ($(ADK_CPU_I586),y)
+ $(SED) 's/.*\(CONFIG_686\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_586\).*/\1=y/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_486\).*/# \1 is not set/' ${WRKBUILD}/.config
endif
+ifeq ($(ADK_CPU_I686),y)
+ $(SED) 's/.*\(CONFIG_686\).*/\1=y/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_586\).*/# \1 is not set/' ${WRKBUILD}/.config
+ $(SED) 's/.*\(CONFIG_486\).*/# \1 is not set/' ${WRKBUILD}/.config
+endif
+endif
+# mips64
ifeq ($(ADK_TARGET_ARCH_MIPS64),y)
ifeq ($(ADK_n64),y)
$(SED) 's/.*\(CONFIG_MIPS_N64_ABI\).*/\1=y/' ${WRKBUILD}/.config
@@ -94,16 +128,6 @@ ifeq ($(ADK_o32),y)
$(SED) 's/.*\(CONFIG_MIPS_N64_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
endif
endif
-# powerpc
-ifeq ($(ADK_TARGET_ARCH_PPC),y)
-ifeq ($(ADK_TARGET_CPU_WITH_FPU),y)
- $(SED) 's/.*\(UCLIBC_HAS_FPU\).*/\1=y/' ${WRKBUILD}/.config
- $(SED) 's/.*\(UCLIBC_HAS_SOFT_FLOAT\).*/# \1 is not set/' ${WRKBUILD}/.config
-else
- $(SED) 's/.*\(UCLIBC_HAS_FPU\).*/# \1 is not set/' ${WRKBUILD}/.config
- $(SED) 's/.*\(UCLIBC_HAS_SOFT_FLOAT\).*/#\1=y/' ${WRKBUILD}/.config
-endif
-endif
echo N|PATH='$(HOST_PATH)' $(MAKE) ${UCLIBC_MAKEOPTS} -C $(WRKBUILD) \
PREFIX=$(STAGING_TARGET_DIR) \
DEVEL_PREFIX=/usr/ \