From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757843AbcCUUkf (ORCPT ); Mon, 21 Mar 2016 16:40:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38401 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751508AbcCUUke (ORCPT ); Mon, 21 Mar 2016 16:40:34 -0400 Date: Mon, 21 Mar 2016 17:40:30 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Josh Poimboeuf , Lucas Stach , Jiri Olsa , linux-kernel@vger.kernel.org, kernel@pengutronix.de, patchwork-lst@pengutronix.de, Wang Nan , acme@kernel.org Subject: Re: [PATCH] tools lib api: respect CROSS_COMPILE for the linker Message-ID: <20160321204030.GB2468@redhat.com> References: <1458235670-27341-1-git-send-email-l.stach@pengutronix.de> <20160318162547.GA2701@redhat.com> <20160318163815.qe7f7cwzis4riwnj@treble.redhat.com> <20160318164522.GB2701@redhat.com> <20160318171623.mih7ozxyinn33ads@treble.redhat.com> <20160318173852.GD2701@redhat.com> <20160321080852.GC3788@krava.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160321080852.GC3788@krava.brq.redhat.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.20 (2009-12-10) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 21 Mar 2016 20:40:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Mar 21, 2016 at 09:08:52AM +0100, Jiri Olsa escreveu: > On Fri, Mar 18, 2016 at 02:38:52PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Fri, Mar 18, 2016 at 12:16:23PM -0500, Josh Poimboeuf escreveu: > > > So 'allow-override' would probably be a good option. > > Humm, my preference is to make tools/ look like the kernel, and the > > kernel doesn't use that allow-override thing, right? So perhaps add what > > is missing to make it look exactly like the kernel and then ditch this > > allow-override thing? > Steven explained his reason for allow-override in the comment above it, > please make sure the new solution follows that Sure, and I'm no make guru, but what puzzles me is why isn't this required in: [acme@jouet linux]$ grep -w ^CC Makefile CC = $(CROSS_COMPILE)gcc [acme@jouet linux]$ > > What about having all this in a single place in tools/script/? > > maybe tools/script/Makefile.comp But then we would have to include multiple files in each Makefile, perhaps it would be better to stash this in tools/scripts/Makefile.include, that way we wouldn't have to include any new file. - Arnaldo P.S. While looking at the main kernel Makefile git history I found goodies we could use in tools/, like: commit 84336466011c589b6af554f2f2f1fcfa1a5c1437 Author: Roland McGrath Date: Mon Dec 21 16:24:06 2009 -0800 kconfig CROSS_COMPILE option ------------------------------------------------------------------------- And also by trying hard to mimic (preferrably use a exact copy) the kernel we can avoid suffering from subtle stuff like: commit 2331d1a6cd3d6e580bc88b9a160066d9e1177fe1 Author: Sam Ravnborg Date: Sun Oct 11 23:22:58 2009 +0200 kbuild: revert "save ARCH & CROSS_COMPILE ..." -------------------------------------------------------------------------