# subdirectories to descend into
tools-y :=
-ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN)$(CONFIG_GCC_LLVM),)
+ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
BUILD_TOOLCHAIN := y
endif
ifdef CONFIG_GCC_USE_GRAPHITE
tools-y += sstrip ipkg-utils genext2fs e2fsprogs mtd-utils mkimage
tools-y += firmware-utils patch-image patch quilt yaffs2 flock padjffs2
tools-y += mm-macros xorg-macros xfce-macros missing-macros xz cmake scons bc
-tools-y += findutils gengetopt
+tools-y += findutils gengetopt patchelf
tools-$(CONFIG_TARGET_orion_generic) += wrt350nv2-builder upslug2
tools-$(CONFIG_powerpc) += upx
tools-$(CONFIG_TARGET_x86) += qemu
$(curdir)/bc/compile := $(curdir)/bison/install
$(curdir)/findutils/compile := $(curdir)/bison/install
$(curdir)/gengetopt/compile := $(curdir)/libtool/install
+$(curdir)/patchelf/compile := $(curdir)/libtool/install
ifneq ($(CONFIG_CCACHE),)
$(foreach tool, $(tools-y), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/install))