toolchain-external: check sysroot *after* copying
PATCH 1/1 toolchain-external: check sysroot *after* copying
The current toolchain checking code will probe the files in the sysroot to make sure things are sane, but it does this *before* it actually copies the files in question over. Thus from a clean build, it's impossible to actually use the external toolchain option.
So re-order things so we initialize the local sysroot first and then check the result.
--- toolchain/toolchain-external/ext-tool.mk | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
toolchain/toolchain-external/ext-tool.mk +5 -5
@@ -93,11 +93,6 @@ endif ifeq ($(BR2_INSTALL_LIBSTDCPP),y) $(Q)$(call check_cplusplus) endif -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y) - $(Q)$(call check_uclibc,$(SYSROOT_DIR)) -else - $(Q)$(call check_glibc,$(SYSROOT_DIR)) -endif mkdir -p $(TARGET_DIR)/lib @echo "Copy external toolchain libraries to target..." $(Q)for libs in $(LIB_EXTERNAL_LIBS); do \
@@ -112,4 +107,9 @@ endif $(Q)if [ -L $(ARCH_SYSROOT_DIR)/lib64 ] ; then \ $(call create_lib64_symlinks) ; \ fi +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y) + $(Q)$(call check_uclibc,$(SYSROOT_DIR)) +else + $(Q)$(call check_glibc,$(SYSROOT_DIR)) +endif @touch $@
Signature · 1 line
1.7.3.3
PATCH 1/1 toolchain-external: check sysroot *after* copying
Quoted 7 lines · On Sun, 12 Dec 2010 11:25:23 -0500 Mike Frysinger <[email protected]> wrote:
The current toolchain checking code will probe the files in the sysroot to make sure things are sane, but it does this *before* it actually copies the files in question over. Thus from a clean build, it's impossible to actually use the external toolchain option.
So re-order things so we initialize the local sysroot first and then check the result.
SYSROOT_DIR points to the original sysroot of the toolchain, not the one we copy locally for Buildroot. So the original sysroot of the toolchain is already available when starting a new build.
See the definition of SYSROOT_DIR:
TARGET_CC_NO_SYSROOT=$(filter-out --sysroot=%,$(TARGET_CC_NOCCACHE)) SYSROOT_DIR=$(shell $(TARGET_CC_NO_SYSROOT) -print-sysroot 2>/dev/null)
Could you point the specific problem you're having ?
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 toolchain-external: check sysroot *after* copying
Quoted 6 lines · On Monday, December 13, 2010 11:52:44 Thomas Petazzoni wrote:
Quoted 5 lines · On Sun, 12 Dec 2010 11:25:23 -0500 Mike Frysinger wrote:
The current toolchain checking code will probe the files in the sysroot to make sure things are sane, but it does this *before* it actually copies the files in question over. Thus from a clean build, it's impossible to actually use the external toolchain option.
Quoted 6 lines
Quoted 2 lines
So re-order things so we initialize the local sysroot first and then check the result.
SYSROOT_DIRpoints to the original sysroot of the toolchain, not the one we copy locally for Buildroot. So the original sysroot of the toolchain is already available when starting a new build.
ok, so i misinterpreted the errors fixed by the other toolchain patches ive posted around the same time as this one. for more details, consult those.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101213/0472f868/attachment.pgp>