From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752096AbbASMPE (ORCPT ); Mon, 19 Jan 2015 07:15:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55044 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751444AbbASMPB (ORCPT ); Mon, 19 Jan 2015 07:15:01 -0500 Date: Mon, 19 Jan 2015 13:13:41 +0100 From: Jiri Olsa To: Mark Rutland Cc: Will Deacon , Jiri Olsa , "linux-kernel@vger.kernel.org" , Adrian Hunter , Alexis Berlemont , Andi Kleen , Anton Blanchard , Arnaldo Carvalho de Melo , Borislav Petkov , Borislav Petkov , Cody P Schafer , Corey Ashford , David Ahern , Florian Fainelli , Frederic Weisbecker , Ingo Molnar , "msalter@redhat.com" , Namhyung Kim , Paul Mackerras , Peter Zijlstra , "S. Lockwood-Childs" , Sam Ravnborg , Sasha Levin , Stephane Eranian , Steven Rostedt , Sukadev Bhattiprolu Subject: Re: [PATCHv2 00/36] perf tools: New build framework Message-ID: <20150119121340.GA12706@krava.brq.redhat.com> References: <1421326532-25660-1-git-send-email-jolsa@kernel.org> <20150116113921.GL7091@arm.com> <20150116121214.GI21809@leverpostej> <20150116122221.GN7091@arm.com> <20150116123013.GB15672@krava.brq.redhat.com> <20150116124349.GA23967@krava.brq.redhat.com> <20150116134910.GA22569@leverpostej> <20150116141552.GB23967@krava.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150116141552.GB23967@krava.brq.redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 16, 2015 at 03:15:52PM +0100, Jiri Olsa wrote: > On Fri, Jan 16, 2015 at 01:49:10PM +0000, Mark Rutland wrote: > > Hi, > > > > [...] > > > > > > > > I just tried a cross-build for arm, and that blew up when trying to do > > > > > > something with arch/arm/util/libperf-in.o (log below). I bisected that > > > > > > to f169fbc4c59dd9d4 "perf build: Add arch x86 objects building". I'm > > > > > > looking into why now. > > > > > > > > > > I get a similar failure doing a native arm64 build. I think the problem is > > > > > because the arch/ files for arm and arm64 aren't always required (i.e. there > > > > > are configurations where nothing is built under there) and, consequently, > > > > > libperf-in.o isn't actually needed and we try to link against something that > > > > > doesn't exist. > > > > > > > > exactly ;-) I'll spin v3 shortly.. > > > > > > this fixes the issue for me > > > > > > jirka > > > > > > > > > --- > > > diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build > > > index d35b66014992..396b33b124d1 100644 > > > --- a/tools/build/Makefile.build > > > +++ b/tools/build/Makefile.build > > > @@ -52,7 +52,7 @@ quiet_cmd_cc_s_c = AS $@ > > > > > > # Link agregate command > > > quiet_cmd_ld_multi = LD $@ > > > - cmd_ld_multi = $(LD) -r -o $@ $^ > > > + cmd_ld_multi = $(LD) -r -o $@ $(wildcard $^) > > > > > > # Build rules > > > $(OUTPUT)%.o: %.c FORCE > > > > > > > Unfortunately that doesn't seem to be sufficient for me when > > cross-compiling. It looks like it supresses the warning from Make, but > > then LD explodes anyway because it wasn't provided any input files (log > > below). > > argh.. right, when there are no source objects at all :-\ fix is comming ;-) ok, for a minute I forgot I'm stealing this from kbuild.. aaand they have a solution of course ;-) so I'm now always creating $(obj)-in.o objects (even empty ones), and it seems to work nicely.. as in kbuild ;-) the update 'perf/build' branch' with the fix is in: git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git perf/build I tried on arm64,ppc64,s390,x86_64,i386 I'll spin v3 shortly (after doc updates), but any testing would be great thanks, jirka