Add toolchain wrapper for external toolchains

Add a simple toolchain wrapper for external toolchains, which forces the
correct sysroot/march/mtune/floating point options needed to use it
with buildroot.

With this in place the external toolchain behaves similar to the internal
ones, and the special handling can be removed. This also means that the
toolchain is usable outside buildroot without having to pass any special
compiler flags.

Also adjust the downloadable external toolchain support to install under
HOST_DIR so it can be used after the temporary build files are removed.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
Peter Korsgaard
2011-04-29 13:09:26 +02:00
parent 6721878972
commit 85dc57f6fd
4 changed files with 154 additions and 21 deletions

View File

@@ -103,18 +103,8 @@ TARGET_SYSROOT_OPT=--sysroot=$(STAGING_DIR)
ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_CTNG),y)
TARGET_CROSS=$(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-
else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
TOOLCHAIN_EXTERNAL_PREFIX=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
TOOLCHAIN_EXTERNAL_LOCATION=$(TOOLCHAIN_EXTERNAL_DIR)
else
TOOLCHAIN_EXTERNAL_LOCATION=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH))
endif
ifneq ($(TOOLCHAIN_EXTERNAL_LOCATION),)
TARGET_CROSS=$(TOOLCHAIN_EXTERNAL_LOCATION)/bin/$(TOOLCHAIN_EXTERNAL_PREFIX)-
else
TARGET_CROSS=$(TOOLCHAIN_EXTERNAL_PREFIX)-
endif
TARGET_CROSS=$(HOST_DIR)/usr/bin/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))-
endif
# Quotes are needed for spaces et al in path components.