summaryrefslogtreecommitdiff
path: root/make/uclibc.mk
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2004-01-14 10:03:44 +0000
committerManuel Novoa III <mjn3@codepoet.org>2004-01-14 10:03:44 +0000
commit9168e8380931531eb69f62a543b9f7413115eaaf (patch)
treec0a96dd6b369a6061a6cdfd94ff9bbcebf90d173 /make/uclibc.mk
parent073534b925bd17ae9f87b889a676e2bcea246b5d (diff)
Enable building <arch>-linux-uclibc toolchains. Note that, due to config
issues for applications, we also create staging_dir/bin/<arch>-linux-* symlinks which allows us to configure most apps with target=<arch>-linux. gcc 3.3.2 libstdc++ now correctly identifies uclibc locale support. There are still some issues (mainly related to wide char time strings and wcsftime) to be addressed, but those are on hold until the uClibc locale internals are reworked once again. With the new stuff, we can also build gcc 2.95 and STLport again, although the native gcc build for the target is failing. Archs supported (some archs not yet tested): 2.95 - i386, arm, mips*, powerpc. 3.3.2 - Hopefull all for which uClibc has shared lib support.
Diffstat (limited to 'make/uclibc.mk')
-rw-r--r--make/uclibc.mk82
1 files changed, 41 insertions, 41 deletions
diff --git a/make/uclibc.mk b/make/uclibc.mk
index f51eff20d..b5059c364 100644
--- a/make/uclibc.mk
+++ b/make/uclibc.mk
@@ -34,6 +34,9 @@ $(DL_DIR)/$(UCLIBC_SOURCE):
$(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE)
bzcat $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ #(cd $(BUILD_DIR) ; ln -s $(DL_DIR)/uClibc)
+ #-mkdir $(UCLIBC_DIR)
+ #(cd $(DL_DIR)/uClibc && tar cf - .) | (cd $(UCLIBC_DIR) && tar xvfp - )
touch $(UCLIBC_DIR)/.unpacked
$(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.unpacked $(LINUX_DIR)/.configured
@@ -64,39 +67,44 @@ endif
$(SED) 's,.*HAS_FPU.*,HAS_FPU=n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,g' \
$(UCLIBC_DIR)/.config; \
fi
- $(MAKE) -C $(UCLIBC_DIR) PREFIX=$(STAGING_DIR) headers install_dev;
- rm -rf $(STAGING_DIR)/include
- ln -s usr/include $(STAGING_DIR)/include
+ $(MAKE) -C $(UCLIBC_DIR) \
+ PREFIX=$(STAGING_DIR)/ \
+ DEVEL_PREFIX=$(REAL_GNU_TARGET_NAME)/ \
+ RUNTIME_PREFIX=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/ \
+ pregen install_dev;
touch $(UCLIBC_DIR)/.configured
$(UCLIBC_DIR)/lib/libc.a: $(UCLIBC_DIR)/.configured $(LIBFLOAT_TARGET)
- $(MAKE) -C $(UCLIBC_DIR) oldconfig
- $(MAKE) -C $(UCLIBC_DIR) headers
-ifeq ($(ENABLE_LOCALE),true)
- -$(MAKE) -C $(UCLIBC_DIR) pregen
-endif
- $(MAKE) -C $(UCLIBC_DIR)
-
-$(STAGING_DIR)/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a
- $(MAKE) -C $(UCLIBC_DIR) PREFIX=$(STAGING_DIR) install_dev install_runtime
- $(MAKE) -C $(UCLIBC_DIR) PREFIX=$(STAGING_DIR) utils install_utils
+ $(MAKE) -C $(UCLIBC_DIR) \
+ PREFIX= \
+ DEVEL_PREFIX=$(REAL_GNU_TARGET_NAME)/ \
+ RUNTIME_PREFIX=/ \
+ all
+
+$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a
+ $(MAKE) -C $(UCLIBC_DIR) \
+ PREFIX=$(STAGING_DIR)/ \
+ DEVEL_PREFIX=$(REAL_GNU_TARGET_NAME)/ \
+ RUNTIME_PREFIX=$(REAL_GNU_TARGET_NAME)/ \
+ install_runtime
+ $(MAKE) -C $(UCLIBC_DIR) \
+ PREFIX=$(STAGING_DIR)/ \
+ DEVEL_PREFIX=$(REAL_GNU_TARGET_NAME)/ \
+ RUNTIME_PREFIX=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/ \
+ install_dev
+ $(MAKE) -C $(UCLIBC_DIR) \
+ PREFIX=$(STAGING_DIR) \
+ utils install_utils
# Clean up the host compiled utils...
$(MAKE) -C $(UCLIBC_DIR)/utils clean
- (cd $(STAGING_DIR)/lib; \
- ln -fs libc.so.0 libc.so; \
- ln -fs libdl.so.0 libdl.so; \
- ln -fs libcrypt.so.0 libcrypt.so; \
- ln -fs libresolv.so.0 libresolv.so; \
- ln -fs libutil.so.0 libutil.so; \
- ln -fs libm.so.0 libm.so; \
- ln -fs libpthread.so.0 libpthread.so; \
- ln -fs libnsl.so.0 libnsl.so; \
- ln -fs libthread_db.so.1 libthread_db.so; \
- )
ifneq ($(TARGET_DIR),)
-$(TARGET_DIR)/lib/libc.so.0: $(STAGING_DIR)/lib/libc.a
- $(MAKE) -C $(UCLIBC_DIR) PREFIX=$(TARGET_DIR) install_runtime
+$(TARGET_DIR)/lib/libc.so.0: $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a
+ $(MAKE) -C $(UCLIBC_DIR) \
+ PREFIX=$(TARGET_DIR) \
+ DEVEL_PREFIX=/usr/ \
+ RUNTIME_PREFIX=/ \
+ install_runtime
$(TARGET_DIR)/usr/bin/ldd: $(TARGET_DIR)/lib/libc.so.0
$(MAKE) -C $(UCLIBC_DIR) $(TARGET_CONFIGURE_OPTS) \
@@ -107,7 +115,7 @@ endif
uclibc-configured: $(UCLIBC_DIR)/.configured
-uclibc: $(STAGING_DIR)/bin/$(ARCH)-linux-gcc $(STAGING_DIR)/lib/libc.a \
+uclibc: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a \
$(UCLIBC_TARGETS)
uclibc-source: $(DL_DIR)/$(UCLIBC_SOURCE)
@@ -131,20 +139,12 @@ uclibc-dirclean:
#
#############################################################
-$(TARGET_DIR)/usr/lib/libc.a: $(STAGING_DIR)/lib/libc.a
- $(MAKE) -C $(UCLIBC_DIR) $(TARGET_CONFIGURE_OPTS) \
- PREFIX=$(TARGET_DIR) install_dev
- (cd $(TARGET_DIR)/usr/lib; \
- ln -fs /lib/libc.so.0 libc.so; \
- ln -fs /lib/libdl.so.0 libdl.so; \
- ln -fs /lib/libcrypt.so.0 libcrypt.so; \
- ln -fs /lib/libresolv.so.0 libresolv.so; \
- ln -fs /lib/libutil.so.0 libutil.so; \
- ln -fs /lib/libm.so.0 libm.so; \
- ln -fs /lib/libpthread.so.0 libpthread.so; \
- ln -fs /lib/libnsl.so.0 libnsl.so; \
- ln -fs /lib/libthread_db.so.1 libthread_db.so; \
- )
+$(TARGET_DIR)/usr/lib/libc.a: $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a
+ $(MAKE) -C $(UCLIBC_DIR) \
+ PREFIX=$(TARGET_DIR) \
+ DEVEL_PREFIX=/usr/ \
+ RUNTIME_PREFIX=/ \
+ install_dev
ifeq ($(GCC_2_95_TOOLCHAIN),true)
uclibc_target: gcc2_95 uclibc $(TARGET_DIR)/usr/lib/libc.a