-$(curdir)/upslug2/compile := $(curdir)/automake/install
-$(curdir)/mm-macros/compile := $(curdir)/automake/install
-$(curdir)/xorg-macros/compile := $(curdir)/automake/install
-$(curdir)/xfce-macros/compile := $(curdir)/automake/install
-$(curdir)/missing-macros/compile := $(curdir)/automake/install
-$(curdir)/e2fsprogs/compile := $(curdir)/automake/install
-$(curdir)/libelf/compile := $(curdir)/automake/install
-
-ifneq ($(CONFIG_CCACHE),)
-$(foreach tool, $(tools-y), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/install))
+$(curdir)/upslug2/compile := $(curdir)/libtool/install
+$(curdir)/mm-macros/compile := $(curdir)/libtool/install
+$(curdir)/missing-macros/compile := $(curdir)/autoconf/install
+$(curdir)/e2fsprogs/compile := $(curdir)/libtool/install
+$(curdir)/libelf/compile := $(curdir)/libtool/install
+$(curdir)/sdcc/compile := $(curdir)/bison/install
+$(curdir)/b43-tools/compile := $(curdir)/bison/install
+$(curdir)/padjffs2/compile := $(curdir)/findutils/install
+$(curdir)/isl/compile := $(curdir)/gmp/install
+$(curdir)/bc/compile := $(curdir)/bison/install
+$(curdir)/findutils/compile := $(curdir)/bison/install
+$(curdir)/gengetopt/compile := $(curdir)/libtool/install
+$(curdir)/patchelf/compile := $(curdir)/libtool/install
+$(curdir)/dosfstools/compile := $(curdir)/autoconf/install $(curdir)/automake/install
+$(curdir)/mkimage/compile += $(curdir)/libressl/install
+$(curdir)/firmware-utils/compile += $(curdir)/libressl/install
+$(curdir)/cmake/compile += $(curdir)/libressl/install
+
+ifneq ($(HOST_OS),Linux)
+ tools-y += coreutils
+endif
+
+ifneq ($(CONFIG_CCACHE)$(CONFIG_SDK),)
+$(foreach tool, $(filter-out xz patch,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/install))