Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754009AbbCQLvI (ORCPT ); Tue, 17 Mar 2015 07:51:08 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:10984 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753457AbbCQLvE (ORCPT ); Tue, 17 Mar 2015 07:51:04 -0400 From: Wang Nan To: , , CC: , Subject: [PATCH -tip] perf tools: fix building error for arm64. Date: Tue, 17 Mar 2015 11:28:38 +0000 Message-ID: <1426591718-35046-1-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.197.210] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.55081525.020A,ss=1,re=0.001,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 2c96758770d5dbe439138dde2106becc Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit b11db6581beaccef8ae9a388ae96074aa5cc144f ("perf tools: Fix build error on ARCH=i386/x86_64/sparc64") use sed process ARCH, which triggers a bug in sequence of sed expression, where 's/arm.*/arm/' will replace 'arm64' to 'arm', causes arm64 building failure. This patch replaces 'arm64' to 'aarch64' before 's/arm.*/arm/' to protect arm64 and replaces 'aarch64' back to 'arm64' after fixing 'arm.*'. Signed-off-by: Wang Nan --- tools/perf/config/Makefile.arch | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/config/Makefile.arch b/tools/perf/config/Makefile.arch index e972057..6224eb8 100644 --- a/tools/perf/config/Makefile.arch +++ b/tools/perf/config/Makefile.arch @@ -2,8 +2,11 @@ ifndef ARCH ARCH := $(shell uname -m 2>/dev/null || echo not) endif +# Set arm64 to aarch64 before replacing arm.* to arm to protect ARCH = arm64. +# aarch64 will be replaced by arm64 again. ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ -e s/sun4u/sparc/ -e s/sparc64/sparc/ \ + -e s/arm64/aarch64/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \ -e s/s390x/s390/ -e s/parisc64/parisc/ \ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ -- 1.8.3.4