From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752604AbcGUNND (ORCPT ); Thu, 21 Jul 2016 09:13:03 -0400 Received: from mail.kernel.org ([198.145.29.136]:57088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752478AbcGUNM6 (ORCPT ); Thu, 21 Jul 2016 09:12:58 -0400 Date: Thu, 21 Jul 2016 10:12:48 -0300 From: Arnaldo Carvalho de Melo To: Stephen Rothwell Cc: Josh Poimboeuf , Andy Lutomirski , Arnaldo Carvalho de Melo , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "linux-next@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Message-ID: <20160721131248.GH18962@kernel.org> References: <20160718234132.GI2207@kernel.org> <20160719102629.0a12a1a1@canb.auug.org.au> <20160719003906.GJ2207@kernel.org> <20160719132608.1aa2692a@canb.auug.org.au> <20160719125443.GL2207@kernel.org> <20160719174551.GM2207@kernel.org> <20160720092157.7cd8de65@canb.auug.org.au> <20160720095333.3034531c@canb.auug.org.au> <20160720025202.GB18962@kernel.org> <20160721092950.0047531e@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160721092950.0047531e@canb.auug.org.au> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Jul 21, 2016 at 09:29:50AM +1000, Stephen Rothwell escreveu: > Hi Arnaldo, > > On Tue, 19 Jul 2016 23:52:02 -0300 Arnaldo Carvalho de Melo wrote: > > > > Humm, it seems that the compiler used is not the cross one, but the > > native, check if, say, __powerpc__ is defined. > > Yes, __powerpc__ is defined (unsuprisingly). Maybe this one? diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile index 1f75b0a046cc..3500fcf7bd47 100644 --- a/tools/objtool/Makefile +++ b/tools/objtool/Makefile @@ -1,10 +1,14 @@ include ../scripts/Makefile.include +HOSTARCH=$(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ + -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/ -e s/aarch64.*/arm64/ ) + ifndef ($(ARCH)) -ARCH ?= $(shell uname -m) -ifeq ($(ARCH),x86_64) -ARCH := x86 -endif +ARCH ?= $(HOSTARCH) endif # always use the host compiler @@ -26,7 +30,7 @@ OBJTOOL_IN := $(OBJTOOL)-in.o all: $(OBJTOOL) -INCLUDES := -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(ARCH)/include/uapi +INCLUDES := -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi CFLAGS += -Wall -Werror $(EXTRA_WARNINGS) -fomit-frame-pointer -O2 -g $(INCLUDES) LDFLAGS += -lelf $(LIBSUBCMD)