From patchwork Wed Jul 4 13:18:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ellerman X-Patchwork-Id: 1156051 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 22566DFFF8 for ; Wed, 4 Jul 2012 13:20:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751962Ab2GDNU3 (ORCPT ); Wed, 4 Jul 2012 09:20:29 -0400 Received: from ozlabs.org ([203.10.76.45]:59736 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752105Ab2GDNUW (ORCPT ); Wed, 4 Jul 2012 09:20:22 -0400 Received: by ozlabs.org (Postfix, from userid 1034) id 5BD6F2C01CC; Wed, 4 Jul 2012 23:20:21 +1000 (EST) From: Michael Ellerman To: kvm@vger.kernel.org Cc: penberg@kernel.org, levinsasha928@gmail.com, asias.hejun@gmail.com, Subject: [PATCH 4/4] kvm tools: Cleanup ARCH & uname_M in Makefile Date: Wed, 4 Jul 2012 23:18:58 +1000 Message-Id: <1341407938-23478-4-git-send-email-michael@ellerman.id.au> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1341407938-23478-1-git-send-email-michael@ellerman.id.au> References: <1341407938-23478-1-git-send-email-michael@ellerman.id.au> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The sed expression for ARCH seems to have been cribbed from the top-level kernel Makefile, and includes lots of architectures kvmtool doesn't support - strip it down. Also call uname -m directly there and get rid of uname_M. Signed-off-by: Michael Ellerman --- tools/kvm/Makefile | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tools/kvm/Makefile b/tools/kvm/Makefile index 501387b..f9e1ec1 100644 --- a/tools/kvm/Makefile +++ b/tools/kvm/Makefile @@ -90,14 +90,9 @@ OBJS += kvm-ipc.o OBJS += builtin-sandbox.o OBJS += virtio/mmio.o -# Additional ARCH settings for x86 -ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ - -e s/arm.*/arm/ -e s/sa110/arm/ \ - -e s/s390x/s390/ -e s/parisc64/parisc/ \ - -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ - -e s/sh[234].*/sh/ ) - -uname_M := $(shell uname -m | sed -e s/i.86/i386/) +# Translate uname -m into ARCH string +ARCH ?= $(shell uname -m | sed -e s/i.86/i386/ -e s/ppc.*/powerpc/) + ifeq ($(ARCH),i386) ARCH := x86 DEFINES += -DCONFIG_X86_32