* [Buildroot] [PATCH] toolchain-external: check sysroot *after* copying
@ 2010-12-12 16:25 Mike Frysinger
2010-12-13 16:52 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2010-12-12 16:25 UTC (permalink / raw)
To: buildroot
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.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
toolchain/toolchain-external/ext-tool.mk | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 53ad636..a913162 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -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 $@
--
1.7.3.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] toolchain-external: check sysroot *after* copying
2010-12-12 16:25 [Buildroot] [PATCH] toolchain-external: check sysroot *after* copying Mike Frysinger
@ 2010-12-13 16:52 ` Thomas Petazzoni
2010-12-13 17:27 ` Mike Frysinger
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2010-12-13 16:52 UTC (permalink / raw)
To: buildroot
On Sun, 12 Dec 2010 11:25:23 -0500
Mike Frysinger <vapier@gentoo.org> 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
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] toolchain-external: check sysroot *after* copying
2010-12-13 16:52 ` Thomas Petazzoni
@ 2010-12-13 17:27 ` Mike Frysinger
0 siblings, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2010-12-13 17:27 UTC (permalink / raw)
To: buildroot
On Monday, December 13, 2010 11:52:44 Thomas Petazzoni wrote:
> 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.
> >
> > 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.
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-13 17:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-12 16:25 [Buildroot] [PATCH] toolchain-external: check sysroot *after* copying Mike Frysinger
2010-12-13 16:52 ` Thomas Petazzoni
2010-12-13 17:27 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox