summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2006-12-13 11:51:42 +0000
committerEric Andersen <andersen@codepoet.org>2006-12-13 11:51:42 +0000
commitc6201a9df306272c324cac14f6ef87796077da84 (patch)
tree875fd8a6cdf32ed31ae548e37c8f29ccf8dd93f7
parent64bc2777e56a43f5ddaca94301ca07792b9ef0ab (diff)
downloadbuildroot-novena-c6201a9df306272c324cac14f6ef87796077da84.tar.gz
buildroot-novena-c6201a9df306272c324cac14f6ef87796077da84.zip
update ordering, automagically handle x86 subtypes
-rw-r--r--toolchain/uClibc/uclibc.mk53
1 files changed, 43 insertions, 10 deletions
diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk
index 19ecc982e..60f0ee1eb 100644
--- a/toolchain/uClibc/uclibc.mk
+++ b/toolchain/uClibc/uclibc.mk
@@ -68,11 +68,8 @@ $(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE)
toolchain/patch-kernel.sh $(UCLIBC_DIR) toolchain/uClibc/ \*$(UCLIBC_VER)\*.patch
touch $(UCLIBC_DIR)/.unpacked
-# nothing to do -- some targets may wish to provide their own
-# and then use sed to hack up the default uClibc config...
-uclibc_config_file_prep::
-
-$(UCLIBC_DIR)/.prepared: $(UCLIBC_DIR)/.unpacked uclibc_config_file_prep
+# Some targets may wish to provide their own UCLIBC_CONFIG_FILE...
+$(UCLIBC_DIR)/.config: $(UCLIBC_DIR)/.unpacked $(UCLIBC_CONFIG_FILE)
cp $(UCLIBC_CONFIG_FILE) $(UCLIBC_DIR)/.config
$(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' \
@@ -128,6 +125,37 @@ ifeq ($(BR2_ENABLE_LOCALE),y)
else
$(SED) 's,^.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=n,g' $(UCLIBC_DIR)/.config
endif
+ifeq ("$(KERNEL_ARCH)","i386")
+ /bin/echo "# CONFIG_GENERIC_386 is not set" >> $(UCLIBC_DIR)/.__config
+ /bin/echo "# CONFIG_386 is not set" >> $(UCLIBC_DIR)/.__config
+ /bin/echo "# CONFIG_486 is not set" >> $(UCLIBC_DIR)/.__config
+ /bin/echo "# CONFIG_586 is not set" >> $(UCLIBC_DIR)/.__config
+ /bin/echo "# CONFIG_586MMX is not set" >> $(UCLIBC_DIR)/.__config
+ /bin/echo "# CONFIG_686 is not set" >> $(UCLIBC_DIR)/.__config
+ /bin/echo "# CONFIG_PENTIUMII is not set" >> $(UCLIBC_DIR)/.__config
+ /bin/echo "# CONFIG_PENTIUMIII is not set" >> $(UCLIBC_DIR)/.__config
+ /bin/echo "# CONFIG_PENTIUM4 is not set" >> $(UCLIBC_DIR)/.__config
+ /bin/echo "# CONFIG_K6 is not set" >> $(UCLIBC_DIR)/.__config
+ /bin/echo "# CONFIG_K7 is not set" >> $(UCLIBC_DIR)/.__config
+ /bin/echo "# CONFIG_ELAN is not set" >> $(UCLIBC_DIR)/.__config
+ /bin/echo "# CONFIG_CRUSOE is not set" >> $(UCLIBC_DIR)/.__config
+ /bin/echo "# CONFIG_WINCHIPC6 is not set" >> $(UCLIBC_DIR)/.__config
+ /bin/echo "# CONFIG_WINCHIP2 is not set" >> $(UCLIBC_DIR)/.__config
+ /bin/echo "# CONFIG_CYRIXIII is not set" >> $(UCLIBC_DIR)/.__config
+ /bin/echo "# CONFIG_NEHEMIAH is not set" >> $(UCLIBC_DIR)/.__config
+ifeq ($(BR2_x86_i386),y)
+ $(SED) 's,# CONFIG_386 is not set,CONFIG_386=y,g' $(UCLIBC_DIR)/.config
+endif
+ifeq ($(BR2_x86_i486),y)
+ $(SED) 's,# CONFIG_486 is not set,CONFIG_486=y,g' $(UCLIBC_DIR)/.config
+endif
+ifeq ($(BR2_x86_i586),y)
+ $(SED) 's,# CONFIG_586 is not set,CONFIG_586=y,g' $(UCLIBC_DIR)/.config
+endif
+ifeq ($(BR2_x86_i686),y)
+ $(SED) 's,# CONFIG_686 is not set,CONFIG_686=y,g' $(UCLIBC_DIR)/.config
+endif
+endif
mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/include
mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/lib
mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/lib
@@ -137,9 +165,9 @@ endif
RUNTIME_PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \
HOSTCC="$(HOSTCC)" \
oldconfig
- touch $(UCLIBC_DIR)/.prepared
+ touch $(UCLIBC_DIR)/.config
-$(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.prepared kernel-headers
+$(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.config
set -x && $(MAKE1) -C $(UCLIBC_DIR) \
PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \
DEVEL_PREFIX=/usr/ \
@@ -162,7 +190,7 @@ $(UCLIBC_DIR)/lib/libc.a: $(UCLIBC_DIR)/.configured $(LIBFLOAT_TARGET)
all
touch -c $(UCLIBC_DIR)/lib/libc.a
-uclibc-menuconfig: $(UCLIBC_DIR)/.prepared
+uclibc-menuconfig: $(UCLIBC_DIR)/.config
$(MAKE1) -C $(UCLIBC_DIR) \
PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \
DEVEL_PREFIX=/usr/ \
@@ -172,7 +200,7 @@ uclibc-menuconfig: $(UCLIBC_DIR)/.prepared
touch $(UCLIBC_DIR)/.configured
-$(STAGING_DIR)/lib/libc.a: kernel-headers $(UCLIBC_DIR)/lib/libc.a
+$(STAGING_DIR)/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a
$(MAKE1) -C $(UCLIBC_DIR) \
PREFIX= \
DEVEL_PREFIX=$(STAGING_DIR)/ \
@@ -212,7 +240,7 @@ endif
UCLIBC_TARGETS=$(TARGET_DIR)/lib/libc.so.0
endif
-uclibc-configured: dependencies $(UCLIBC_DIR)/.configured
+uclibc-configured: dependencies kernel-headers $(UCLIBC_DIR)/.configured
uclibc: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc $(STAGING_DIR)/lib/libc.a \
@@ -244,6 +272,11 @@ $(TARGET_DIR)/usr/lib/libc.a: $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a
DEVEL_PREFIX=/usr/ \
RUNTIME_PREFIX=/ \
install_dev
+ # Install the kernel headers to the target dir if necessary
+ if [ ! -f $(TARGET_DIR)/usr/include/linux/version.h ] ; then \
+ cp -pLR $(LINUX_HEADERS_DIR)/include/asm $(TARGET_DIR)/usr/include/ ; \
+ cp -pLR $(LINUX_HEADERS_DIR)/include/linux $(TARGET_DIR)/usr/include/ ; \
+ fi;
touch -c $(TARGET_DIR)/usr/lib/libc.a
uclibc_target: gcc uclibc $(TARGET_DIR)/usr/lib/libc.a $(TARGET_DIR)/usr/bin/ldd