6 --enable-languages=$(TARGET_LANGUAGES) \
9 --with-slibdir=$(TOOLCHAIN_DIR)/lib
11 ifneq ($(CONFIG_GCC_VERSION_4_5),)
14 --with-libelf=$(TOPDIR)/staging_dir/host
17 ifneq ($(CONFIG_TLS_SUPPORT),)
26 mkdir -p $(GCC_BUILD_DIR) $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)
27 # Important! Required for limits.h to be fixed.
28 rm -rf $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
29 ln -sf ../include $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
30 rm -rf $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib
31 ln -sf ../lib $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib
32 $(if $(CONFIG_mips64)$(CONFIG_mips64el)$(CONFIG_x86_64),ln -sf ../lib64 $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib64)
33 (cd $(GCC_BUILD_DIR) && rm -f config.cache; \
39 $(GCC_MAKE) -C $(GCC_BUILD_DIR) all
43 for app in $(TOOLCHAIN_DIR)/bin/$(OPTIMIZE_FOR_CPU)*-{gcc,gcc-*,g++}; do \
44 [ -e $$$$app ] || continue; \
45 old_base=$$$$(basename $$$$app); \
46 new_base=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-$$$${old_base##$(OPTIMIZE_FOR_CPU)-}; \
47 sed -e "s/@CC_BASE@/$$$$old_base/" \
48 -e 's/@EXTRA_ARCH_OPTS@/$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_OPTS))/' \
49 ../files/alternate-arch-cc.in > \
50 $(TOOLCHAIN_DIR)/bin/$$$$new_base; \
51 chmod a+x $(TOOLCHAIN_DIR)/bin/$$$$new_base; \
56 $(_SINGLE)$(GCC_MAKE) -C $(GCC_BUILD_DIR) install
57 # Set up the symlinks to enable lying about target name.
59 (cd $(TOOLCHAIN_DIR); \
60 ln -sf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \
62 for app in $(REAL_GNU_TARGET_NAME)-* ; do \
64 $(GNU_TARGET_NAME)$$$${app##$(REAL_GNU_TARGET_NAME)}; \
67 $(if $(CONFIG_EXTRA_TARGET_ARCH),$(call SetupExtraArch))
70 $(eval $(call HostBuild))