From: Konstantin Khlebnikov <koct9i@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Cc: x86@kernel.org, user-mode-linux-devel@lists.sourceforge.net,
linux-kbuild@vger.kernel.org
Subject: [PATCH] checkstack: use $UTS_MACHINE as target architecture
Date: Sat, 05 Jul 2014 15:22:38 +0400 [thread overview]
Message-ID: <20140705112238.16142.42735.stgit@zurg> (raw)
This fixes command # make checkstack for i386/x86_64.
Looks like $UTS_MACHINE is exactly what scripts/checkstack.pl needs.
By default $UTS_MACHINE is equal to $ARCH, but some arch/${ARCH}/Makefile
overrides it. This patch updates it also in arch/x86/Makefile.um
broken in ffee0de ("x86: Default to ARCH=x86 to avoid overriding CONFIG_64BIT")
Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
---
Makefile | 11 +----------
arch/x86/Makefile.um | 2 ++
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile
index b0ee945..50fb690 100644
--- a/Makefile
+++ b/Makefile
@@ -1416,18 +1416,9 @@ endif #ifeq ($(mixed-targets),1)
PHONY += checkstack kernelrelease kernelversion image_name
-# 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 $(CHECKSTACK_ARCH)
+ $(PERL) $(src)/scripts/checkstack.pl $(UTS_MACHINE)
kernelrelease:
@echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))"
diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
index 36b62bc..8fc912b 100644
--- a/arch/x86/Makefile.um
+++ b/arch/x86/Makefile.um
@@ -3,6 +3,7 @@ core-y += arch/x86/crypto/
ifeq ($(CONFIG_X86_32),y)
START := 0x8048000
+UTS_MACHINE := i386
LDFLAGS += -m elf_i386
ELF_ARCH := i386
ELF_FORMAT := elf32-i386
@@ -47,6 +48,7 @@ KBUILD_AFLAGS += -m64
LDFLAGS += -m elf_x86_64
KBUILD_CPPFLAGS += -m64
+UTS_MACHINE := x86_64
ELF_ARCH := i386:x86-64
ELF_FORMAT := elf64-x86-64
next reply other threads:[~2014-07-05 11:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-05 11:22 Konstantin Khlebnikov [this message]
2014-07-07 22:05 ` [PATCH] checkstack: use $UTS_MACHINE as target architecture Andrew Morton
2014-07-08 5:48 ` Konstantin Khlebnikov
2014-07-08 8:01 ` [uml-devel] " Richard Weinberger
2014-07-08 8:16 ` Konstantin Khlebnikov
2014-07-08 8:20 ` Richard Weinberger
2014-07-08 8:30 ` Konstantin Khlebnikov
2014-07-08 8:33 ` Richard Weinberger
2014-07-08 8:47 ` Konstantin Khlebnikov
2014-07-08 8:50 ` Richard Weinberger
2014-07-08 9:03 ` Konstantin Khlebnikov
2014-07-08 9:06 ` Richard Weinberger
2014-07-08 9:09 ` Geert Uytterhoeven
2014-07-08 9:14 ` Richard Weinberger
2014-07-08 9:22 ` Geert Uytterhoeven
2014-07-08 9:23 ` Richard Weinberger
2014-07-08 10:31 ` Konstantin Khlebnikov
2014-07-08 10:35 ` [PATCH] scripts/checkstack.pl: automatically handle 32-bit and 64-bit mode for ARCH=x86 Konstantin Khlebnikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140705112238.16142.42735.stgit@zurg \
--to=koct9i@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox