diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-12-07 23:14:34 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-12-07 23:14:34 +0000 |
commit | ef1db6bac27babdb24289d38d4f99b691adbed85 (patch) | |
tree | a76d6b39d8cac3d1a4020bd9c24c7d2b390bcf87 | |
parent | 5105581c023f46e27be16e70d641899b7b35bd48 (diff) | |
download | buildroot-novena-ef1db6bac27babdb24289d38d4f99b691adbed85.tar.gz buildroot-novena-ef1db6bac27babdb24289d38d4f99b691adbed85.zip |
improve selection of options based upon buildroot config
-rw-r--r-- | toolchain/uClibc/uClibc.config | 17 | ||||
-rw-r--r-- | toolchain/uClibc/uclibc.mk | 52 |
2 files changed, 54 insertions, 15 deletions
diff --git a/toolchain/uClibc/uClibc.config b/toolchain/uClibc/uClibc.config index d72fcb3ab..0a2ba841c 100644 --- a/toolchain/uClibc/uClibc.config +++ b/toolchain/uClibc/uClibc.config @@ -8,6 +8,7 @@ # TARGET_e1 is not set # TARGET_frv is not set # TARGET_h8300 is not set +# TARGET_hppa is not set # TARGET_i386 is not set # TARGET_i960 is not set # TARGET_m68k is not set @@ -27,6 +28,8 @@ # HAVE_ELF=y TARGET_ARCH="none" +# ARCH_LITTLE_ENDIAN is not set +# ARCH_BIG_ENDIAN is not set # ARCH_HAS_NO_MMU is not set UCLIBC_HAS_FLOATS=y HAS_FPU=y @@ -53,9 +56,10 @@ LDSO_RUNPATH=n # DL_FINI_CRT_COMPAT is not set UCLIBC_CTOR_DTOR=y # HAS_NO_THREADS is not set -UCLIBC_HAS_THREADS=y -PTHREADS_DEBUG_SUPPORT=y -LINUXTHREADS_OLD=y +# UCLIBC_HAS_THREADS is not set +# PTHREADS_DEBUG_SUPPORT is not set +# UCLIBC_HAS_THREADS_NATIVE is not set +# LINUXTHREADS_OLD is not set UCLIBC_HAS_LFS=y # UCLIBC_STATIC_LDCONFIG is not set # MALLOC is not set @@ -125,6 +129,7 @@ UCLIBC_HAS_GNU_GETOPT=y # Big and Tall # UCLIBC_HAS_REGEX=y +UCLIBC_HAS_REGEX_OLD=y # UCLIBC_HAS_WORDEXP is not set UCLIBC_HAS_FTW=y UCLIBC_HAS_GLOB=y @@ -140,6 +145,11 @@ DEVEL_PREFIX="/usr/" # uClibc security related options # # UCLIBC_SECURITY is not set +UCLIBC_BUILD_PIE=n +UCLIBC_HAS_SSP=n +UCLIBC_BUILD_RELRO=y +UCLIBC_BUILD_NOW=y +UCLIBC_BUILD_NOEXECSTACK=y # # uClibc development/debugging options @@ -151,4 +161,5 @@ CROSS_COMPILER_PREFIX="" # SUPPORT_LD_DEBUG is not set # SUPPORT_LD_DEBUG_EARLY is not set WARNINGS="-Wall" +# DOMULTI is not set # UCLIBC_MJN3_ONLY is not set diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk index eb0ceff12..f129ce7a2 100644 --- a/toolchain/uClibc/uclibc.mk +++ b/toolchain/uClibc/uclibc.mk @@ -37,32 +37,51 @@ UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \ -e 's/mipsel.*/mips/' \ -e 's/cris.*/cris/' \ ) - +# just handle the ones that can be big or little +UCLIBC_TARGET_ENDIAN:=$(shell echo $(ARCH) | sed \ + -e 's/armeb/BIG/' \ + -e 's/arm/LITTLE/' \ + -e 's/mipsel/LITTLE/' \ + -e 's/mips/BIG/' \ +) +ifneq ($(UCLIBC_TARGET_ENDIAN),LITTLE) +ifneq ($(UCLIBC_TARGET_ENDIAN),BIG) +UCLIBC_TARGET_ENDIAN:= +endif +endif +ifeq ($(UCLIBC_TARGET_ENDIAN),LITTLE) +UCLIBC_NOT_TARGET_ENDIAN:=BIG +else +UCLIBC_NOT_TARGET_ENDIAN:=LITTLE +endif $(DL_DIR)/$(UCLIBC_SOURCE): mkdir -p $(DL_DIR) $(WGET) -P $(DL_DIR) $(UCLIBC_SITE)/$(UCLIBC_SOURCE) +uclibc-unpacked: $(UCLIBC_DIR)/.unpacked $(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE) mkdir -p $(TOOL_BUILD_DIR) bzcat $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - toolchain/patch-kernel.sh $(UCLIBC_DIR) toolchain/uClibc/ \*.patch touch $(UCLIBC_DIR)/.unpacked +uclibc-configured: $(UCLIBC_DIR)/.configured $(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.unpacked cp $(UCLIBC_CONFIG_FILE) $(UCLIBC_DIR)/.config - $(SED) 's,^CROSS_COMPILER_PREFIX=.*,CROSS_COMPILER_PREFIX="$(TARGET_CROSS)",g' $(UCLIBC_DIR)/.config - $(SED) 's,^.*TARGET_$(UCLIBC_TARGET_ARCH).*,TARGET_$(UCLIBC_TARGET_ARCH)=y,g' \ - $(UCLIBC_DIR)/.config - $(SED) 's,^TARGET_ARCH.*,TARGET_ARCH=\"$(UCLIBC_TARGET_ARCH)\",g' $(UCLIBC_DIR)/.config - $(SED) 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(LINUX_HEADERS_DIR)\",g' \ + $(SED) 's,^CROSS_COMPILER_PREFIX=.*,CROSS_COMPILER_PREFIX="$(TARGET_CROSS)",g' \ + -e 's,# TARGET_$(UCLIBC_TARGET_ARCH) is not set,TARGET_$(UCLIBC_TARGET_ARCH)=y,g' \ + -e 's,^TARGET_ARCH="none",TARGET_ARCH=\"$(UCLIBC_TARGET_ARCH)\",g' \ + -e 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(LINUX_HEADERS_DIR)\",g' \ + -e 's,^RUNTIME_PREFIX=.*,RUNTIME_PREFIX=\"/\",g' \ + -e 's,^DEVEL_PREFIX=.*,DEVEL_PREFIX=\"/usr/\",g' \ + -e 's,^SHARED_LIB_LOADER_PREFIX=.*,SHARED_LIB_LOADER_PREFIX=\"/lib\",g' \ $(UCLIBC_DIR)/.config - $(SED) 's,^RUNTIME_PREFIX=.*,RUNTIME_PREFIX=\"/\",g' \ - $(UCLIBC_DIR)/.config - $(SED) 's,^DEVEL_PREFIX=.*,DEVEL_PREFIX=\"/usr/\",g' \ - $(UCLIBC_DIR)/.config - $(SED) 's,^SHARED_LIB_LOADER_PREFIX=.*,SHARED_LIB_LOADER_PREFIX=\"/lib\",g' \ +ifneq ($(UCLIBC_TARGET_ENDIAN),) + $(SED) '/^# ARCH_$(UCLIBC_TARGET_ENDIAN)_ENDIAN /s,# ,,;s, is not set,=y,g' \ + -e '/^# ARCH_$(UCLIBC_NOT_TARGET_ENDIAN)_ENDIAN /s,# ,,;s, is not set,=n,' \ $(UCLIBC_DIR)/.config +endif ifeq ($(BR2_LARGEFILE),y) $(SED) 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=y,g' $(UCLIBC_DIR)/.config else @@ -72,9 +91,18 @@ endif ifeq ($(BR2_SOFT_FLOAT),y) $(SED) 's,.*HAS_FPU.*,HAS_FPU=n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,g' $(UCLIBC_DIR)/.config endif +ifneq ($(BR2_PTHREADS_NONE),y) + $(SED) 's,# UCLIBC_HAS_THREADS is not set,UCLIBC_HAS_THREADS=y,g' $(UCLIBC_DIR)/.config + $(SED) 's,# PTHREADS_DEBUG_SUPPORT is not set,PTHREADS_DEBUG_SUPPORT=y,g' $(UCLIBC_DIR)/.config +endif +ifeq ($(BR2_PTHREADS),y) + $(SED) 's,# LINUXTHREADS is not set,LINUXTHREADS=y,g' $(UCLIBC_DIR)/.config +endif +ifeq ($(BR2_PTHREADS_OLD),y) + $(SED) 's,# LINUXTHREADS_OLD is not set,LINUXTHREADS_OLD=y,g' $(UCLIBC_DIR)/.config +endif ifeq ($(BR2_PTHREADS_NATIVE),y) $(SED) 's,# UCLIBC_HAS_THREADS_NATIVE is not set,UCLIBC_HAS_THREADS_NATIVE=y,g' $(UCLIBC_DIR)/.config - $(SED) 's,# UCLIBC_HAS_THREADS is not set,UCLIBC_HAS_THREADS=y,g' $(UCLIBC_DIR)/.config endif mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/include mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/lib |