summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-09-06 14:17:02 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-09-06 14:17:02 +0200
commitabb21a3a50a3c12aaa759db96a7aaf5d3bc52951 (patch)
tree0f8731b2cde05232cb1cf2b1f8d91570986365c7 /toolchain
parent6b2356a8a56112dae8fa21b5674491ec277b7c43 (diff)
rework uClibc config file generation
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/gcc/Makefile2
-rw-r--r--toolchain/uclibc/Makefile54
2 files changed, 37 insertions, 19 deletions
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 6a5936604..17ade4d04 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -48,7 +48,7 @@ ifneq ($(ADK_LINUX_AARCH64)$(ADK_LINUX_ALPHA)$(ADK_LINUX_ARC)$(ADK_LINUX_BFIN)$(
GCC_FINAL_CONFOPTS+= --enable-cxx-flags='$(TARGET_CXXFLAGS)'
endif
-ifeq ($(ADK_TARGET_UCLINUX),y)
+ifeq ($(ADK_TARGET_UCLINUX)$(ADK_TARGET_USE_STATIC_LIBS),y)
GCC_FINAL_CONFOPTS+= --disable-shared
else
# uClibc/glibc uses libgcc_s.so.1 for pthread_cancel with dlopen
diff --git a/toolchain/uclibc/Makefile b/toolchain/uclibc/Makefile
index b1e43e568..2935a6503 100644
--- a/toolchain/uclibc/Makefile
+++ b/toolchain/uclibc/Makefile
@@ -35,6 +35,31 @@ 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_USE_STATIC_LIBS)$(ADK_TARGET_BINFMT_FLAT),)
+ $(SED) 's/.*\(HAVE_SHARED\).*/#\1=y/' ${WRKBUILD}/.config
+else
+ $(SED) 's/.*\(HAVE_SHARED\).*/# \1 is not set/' ${WRKBUILD}/.config
+endif
+ifeq ($(ADK_TARGET_USE_GNU_HASHSTYLE),y)
+ $(SED) 's/.*\(LDSO_GNU_HASH_SUPPORT\).*/#\1=y/' ${WRKBUILD}/.config
+else
+ $(SED) 's/.*\(LDSO_GNU_HASH_SUPPORT\).*/# \1 is not set/' ${WRKBUILD}/.config
+endif
+ifneq ($(ADK_PACKAGE_GDB),)
+ $(SED) "s/.*\(PTHREADS_DEBUG_SUPPORT\).*/\1=y/" ${WRKBUILD}/.config
+endif
+ifneq ($(ADK_PACKAGE_GDBSERVER),)
+ $(SED) "s/.*\(PTHREADS_DEBUG_SUPPORT\).*/\1=y/" ${WRKBUILD}/.config
+endif
+ifeq ($(ADK_TARGET_USE_SSP),y)
+ $(SED) 's,.*UCLIBC_HAS_SSP,UCLIBC_HAS_SSP=y,' ${WRKBUILD}/.config
+ echo "UCLIBC_HAS_SSP_COMPAT=n" >> ${WRKBUILD}/.config
+ echo "SSP_QUICK_CANARY=n" >> ${WRKBUILD}/.config
+ echo "UCLIBC_BUILD_SSP=y" >> ${WRKBUILD}/.config
+endif
+
+# architecture specific options
+# arm
ifeq ($(ADK_LINUX_ARM),y)
ifeq ($(ADK_TARGET_ABI_EABI),y)
$(SED) 's/.*\(UCLIBC_HAS_FPU\).*/# \1 is not set/' ${WRKBUILD}/.config
@@ -45,16 +70,11 @@ 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
-endif
-ifeq ($(ADK_LINUX_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
+ifeq ($(ADK_LINUX_ARM_WITH_THUMB),y)
+ $(SED) 's/.*\(COMPILE_IN_THUMB_MODE\).*/\1=y/' ${WRKBUILD}/.config
endif
endif
+# mips/mips64
ifeq ($(ADK_LINUX_MIPS64),y)
$(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS64\).*/\1=y/' ${WRKBUILD}/.config
$(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS32\).*/# \1 is not set/' ${WRKBUILD}/.config
@@ -80,17 +100,15 @@ ifeq ($(ADK_o32),y)
$(SED) 's/.*\(CONFIG_MIPS_N64_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
endif
endif
-ifneq ($(ADK_PACKAGE_GDB),)
- $(SED) "s/.*\(PTHREADS_DEBUG_SUPPORT\).*/\1=y/" ${WRKBUILD}/.config
-endif
-ifeq ($(ADK_LINUX_ARM_WITH_THUMB),y)
- $(SED) 's/.*\(COMPILE_IN_THUMB_MODE\).*/\1=y/' ${WRKBUILD}/.config
+# powerpc
+ifeq ($(ADK_LINUX_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
-ifeq ($(ADK_TARGET_USE_SSP),y)
- $(SED) 's,.*UCLIBC_HAS_SSP,UCLIBC_HAS_SSP=y,' ${WRKBUILD}/.config
- echo "UCLIBC_HAS_SSP_COMPAT=n" >> ${WRKBUILD}/.config
- echo "SSP_QUICK_CANARY=n" >> ${WRKBUILD}/.config
- echo "UCLIBC_BUILD_SSP=y" >> ${WRKBUILD}/.config
endif
echo N|PATH='$(HOST_PATH)' $(MAKE) ${UCLIBC_MAKEOPTS} -C $(WRKBUILD) \
PREFIX=$(STAGING_TARGET_DIR) \