include $(LEVEL)/Makefile.config
-DIRS:= $(patsubst $(SourceDir)%/Makefile,%,$(wildcard $(SourceDir)/*/Makefile))
+DIRS:= $(filter-out llvm-test,$(patsubst $(SourceDir)/%/Makefile,%,$(wildcard $(SourceDir)/*/Makefile)))
+
+# Sparc cannot link shared libraries (libtool problem?) which Stacker uses
+ifeq ($(ARCH), Sparc)
+DIRS := $(filter-out Stacker, $(DIRS))
+DIRS := $(filter-out sample, $(DIRS))
+endif
include $(BUILD_SRC_ROOT)/Makefile.rules