From patchwork Sat Jul 5 11:22:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konstantin Khlebnikov X-Patchwork-Id: 4487221 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 105539F26C for ; Sat, 5 Jul 2014 11:23:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2E0FB202EC for ; Sat, 5 Jul 2014 11:23:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4AF4120265 for ; Sat, 5 Jul 2014 11:23:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751502AbaGELWs (ORCPT ); Sat, 5 Jul 2014 07:22:48 -0400 Received: from mail-la0-f47.google.com ([209.85.215.47]:52947 "EHLO mail-la0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751316AbaGELWr (ORCPT ); Sat, 5 Jul 2014 07:22:47 -0400 Received: by mail-la0-f47.google.com with SMTP id s18so1698200lam.20 for ; Sat, 05 Jul 2014 04:22:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:from:to:cc:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding; bh=agKlamOuvBDvkQLSG57RwX+vhx2c7fXxuIAFD4Yj3vM=; b=jvTN9hvhgGRmQ3Jd47ojXXS2xsiIE6xEuCfxSQqiuZY/LaQ53ee0kOn6WtvJphL9xZ m64/sk+LN14qW0yBROopynWdyL775A5B9gGFkwTHn2UIHojZYFLDdYUov+UPuBAXosIO HIOcsnhKlWeCo7NJQ9yW4Z467sqZBzqCIUQhe3zSYTy5QEET2L2ni3PgFtu0Qb9/1ldL 1Y8UsM4UsPux+CBPFkvDy7wXuF/o1MPHf1/usYJ9lWgfSQxC9DJS0rqSPwltACDaVZQE 45ARpm5HSvnpOxV/VllSbbJYWfovm+FdpIeDHu4QgI5Ib01HkDhvorLl3WuJN+YegoJU 41Qg== X-Received: by 10.112.41.72 with SMTP id d8mr1217457lbl.63.1404559364866; Sat, 05 Jul 2014 04:22:44 -0700 (PDT) Received: from localhost (95-25-124-72.broadband.corbina.ru. [95.25.124.72]) by mx.google.com with ESMTPSA id k3sm14299222lam.4.2014.07.05.04.22.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jul 2014 04:22:43 -0700 (PDT) Subject: [PATCH] checkstack: use $UTS_MACHINE as target architecture From: Konstantin Khlebnikov To: Andrew Morton , linux-kernel@vger.kernel.org Cc: x86@kernel.org, user-mode-linux-devel@lists.sourceforge.net, linux-kbuild@vger.kernel.org Date: Sat, 05 Jul 2014 15:22:38 +0400 Message-ID: <20140705112238.16142.42735.stgit@zurg> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- Makefile | 11 +---------- arch/x86/Makefile.um | 2 ++ 2 files changed, 3 insertions(+), 10 deletions(-) -- 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 --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