2 # Copyright (C) 2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
13 include $(INCLUDE_DIR)/toolchain-build.mk
18 $(strip $(SCRIPT_DIR)/ext-toolchain.sh --toolchain $(CONFIG_TOOLCHAIN_ROOT) \
19 --cflags $(CONFIG_TARGET_OPTIMIZATION) \
20 --cflags "$(if $(call qstrip,$(CONFIG_TOOLCHAIN_LIBC)),-m$(call qstrip,$(CONFIG_TOOLCHAIN_LIBC))) $(if $(CONFIG_SOFT_FLOAT),-msoft-float)" \
21 --cflags "$(patsubst ./%,-I$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_INC_PATH)))" \
22 --cflags "$(patsubst ./%,-L$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_LIB_PATH)))" \
30 @echo -n "Testing external toolchain for $(2) support ... "; \
31 if $(call toolchain_util,--test "$(2)"); then \
35 echo "ERROR: $(1) is enabled but the external toolchain does not support it"; \
42 $(call toolchain_test,CONFIG_SOFT_FLOAT,softfloat)
43 $(call toolchain_test,CONFIG_IPV6,ipv6)
44 $(call toolchain_test,CONFIG_NLS,wchar)
45 $(call toolchain_test,CONFIG_PACKAGE_libpthread,threads)
55 $(call toolchain_util,--wrap "$(TOOLCHAIN_DIR)/bin")
59 rm -rf $(TOOLCHAIN_DIR)/bin
62 $(eval $(call HostBuild))