summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--target/Config.in.arch5
-rw-r--r--toolchain/external-toolchain/ext-tool.mk2
-rw-r--r--toolchain/gcc/gcc-uclibc-4.x.mk8
3 files changed, 12 insertions, 3 deletions
diff --git a/target/Config.in.arch b/target/Config.in.arch
index 62721c9c6..3efebb86a 100644
--- a/target/Config.in.arch
+++ b/target/Config.in.arch
@@ -1,3 +1,6 @@
+config BR2_ARCH_IS_64
+ bool
+
choice
prompt "Target Architecture"
default BR2_i386
@@ -38,8 +41,10 @@ config BR2_sparc
bool "sparc"
config BR2_sparc64
bool "sparc64"
+ select BR2_ARCH_IS_64
config BR2_x86_64
bool "x86_64"
+ select BR2_ARCH_IS_64
config BR2_xtensa
bool "xtensa"
endchoice
diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk
index 40e3a5213..8be86f53a 100644
--- a/toolchain/external-toolchain/ext-tool.mk
+++ b/toolchain/external-toolchain/ext-tool.mk
@@ -306,7 +306,7 @@ endif # ! no threads
TARGET_CC_NO_SYSROOT=$(filter-out --sysroot=%,$(TARGET_CC))
SYSROOT_DIR=$(shell $(TARGET_CC_NO_SYSROOT) -print-sysroot 2>/dev/null)
ifeq ($(SYSROOT_DIR),)
-SYSROOT_DIR=$(shell readlink -f $$(LANG=C $(TARGET_CC_NO_SYSROOT) -print-file-name=libc.a |sed -r -e 's:usr/lib/libc\.a::;'))
+SYSROOT_DIR=$(shell readlink -f $$(LANG=C $(TARGET_CC_NO_SYSROOT) -print-file-name=libc.a) |sed -r -e 's:usr/lib/libc\.a::;')
endif
# Now, find if the toolchain specifies a sub-directory for the
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index 081e906c8..981026fff 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -261,8 +261,11 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_SRC_DIR)/.patched $(GCC_STAGING_PREREQ)
mkdir -p $(GCC_BUILD_DIR2)
# Important! Required for limits.h to be fixed.
ln -snf ../include/ $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/sys-include
- #-rmdir $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
- #ln -snf ../lib $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
+ -rmdir $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
+ mkdir -p $(STAGING_DIR)/lib
+ ln -snf ../../lib $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
+ $(if $(BR2_ARCH_IS_64),mkdir -p $(STAGING_DIR)/lib64)
+ $(if $(BR2_ARCH_IS_64),ln -snf ../../lib64 $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib64)
(cd $(GCC_BUILD_DIR2); rm -rf config.cache; \
$(HOST_CONFIGURE_OPTS) \
$(GCC_SRC_DIR)/configure $(QUIET) \
@@ -307,6 +310,7 @@ $(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled
fi; \
mv "$(STAGING_DIR)/lib64/"* "$(STAGING_DIR)/lib/"; \
rmdir "$(STAGING_DIR)/lib64"; \
+ rm "$(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib64";\
fi
# Strip the host binaries
ifeq ($(GCC_STRIP_HOST_BINARIES),true)