From: Jeff Dike Date: Wed, 13 Dec 2006 08:34:12 +0000 (-0800) Subject: [PATCH] Fix crossbuilding checkstack X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=011e3a9ad4891ba1b27e281e085228189c56b137;p=linux-beck.git [PATCH] Fix crossbuilding checkstack The previous checkstack fix for UML, which needs to use the host's tools, was wrong in the crossbuilding case. It would use the build host's, rather than the target's, toolchain. This patch removes the old fix and adds an explicit special case for UML, leaving everyone else alone. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/Makefile b/Makefile index 4eabaa8afbff..f732e75be43d 100644 --- a/Makefile +++ b/Makefile @@ -1390,12 +1390,18 @@ endif #ifeq ($(mixed-targets),1) PHONY += checkstack kernelrelease kernelversion -# Use $(SUBARCH) here instead of $(ARCH) so that this works for UML. -# In the UML case, $(SUBARCH) is the name of the underlying -# architecture, while for all other arches, it is the same as $(ARCH). +# UML needs a little special treatment here. It wants to use the host +# toolchain, so needs $(SUBARCH) passed to checkstack.pl. Everyone +# else wants $(ARCH), including people doing cross-builds, which means +# that $(SUBARCH) doesn't work here. +ifeq ($(ARCH), um) +CHECKSTACK_ARCH := $(SUBARCH) +else +CHECKSTACK_ARCH := $(ARCH) +endif checkstack: $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ - $(PERL) $(src)/scripts/checkstack.pl $(SUBARCH) + $(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH) kernelrelease: $(if $(wildcard include/config/kernel.release), $(Q)echo $(KERNELRELEASE), \