diff mbox

Makefile: Make checkstack work with O= builds

Message ID 1356141525-25162-1-git-send-email-sboyd@codeaurora.org (mailing list archive)
State New, archived
Headers show

Commit Message

Stephen Boyd Dec. 22, 2012, 1:58 a.m. UTC
The vmlinux doesn't always live in the same directory as the
source files and so 'make O=obj checkstack' fails with a missing
vmlinux file. Fix checkstack so that this is possible.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---

It would also be nice if this depended on vmlinux and modules being built
already but I couldn't figure that part out.

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michal Marek Jan. 13, 2013, 10:02 p.m. UTC | #1
On 22.12.2012 02:58, Stephen Boyd wrote:
> The vmlinux doesn't always live in the same directory as the
> source files and so 'make O=obj checkstack' fails with a missing
> vmlinux file. Fix checkstack so that this is possible.

It works for me even without your patch. With O=<dir>, a second make is
run in <dir>, so $(objtree) is equivalent to . for the top-level
Makefile. Can you post the exact command your run and the error message
you get?

Thanks,
Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 4fe0559..54a386b 100644
--- a/Makefile
+++ b/Makefile
@@ -1318,7 +1318,7 @@  else
 CHECKSTACK_ARCH := $(ARCH)
 endif
 checkstack:
-	$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
+	$(OBJDUMP) -d $(objtree)/vmlinux $$(find $(objtree) -name '*.ko') | \
 	$(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH)
 
 kernelrelease: