Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934988AbcKKRVU (ORCPT ); Fri, 11 Nov 2016 12:21:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60416 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934861AbcKKRVS (ORCPT ); Fri, 11 Nov 2016 12:21:18 -0500 Date: Fri, 11 Nov 2016 11:21:16 -0600 From: Josh Poimboeuf To: Jiri Slaby Cc: Jiri Olsa , Michal Marek , linux-kbuild@vger.kernel.org, Linux kernel mailing list Subject: Re: Kbuild: CC= handling broken for tools/ Message-ID: <20161111172116.2kti4pdkqu6bjpvy@treble> References: <2ef7ef23-5b11-a2cf-6205-4313aedddea8@suse.cz> <20161111140047.GA13610@krava> <20161111151427.GA27779@krava> <20161111153040.o6guxey27qkfzlxs@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 11 Nov 2016 17:21:17 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 804 Lines: 21 On Fri, Nov 11, 2016 at 06:08:24PM +0100, Jiri Slaby wrote: > On 11/11/2016, 04:30 PM, Josh Poimboeuf wrote: > > Does it work if you use KCFLAGS instead of EXTRA_CFLAGS? > > Yes, the kernel builds with the flags now. > > But objtool is unexpectedly still built by a different compiler. > > I would also prefer the flags (like the warning above) to be passed even > when building host commands. In that case, if you want to build *everything* in tools and kernel with the new compiler and new flags, I think you'll need to set HOSTCC, HOSTCFLAGS, and CFLAGS, in addition to CC and KCFLAGS. objtool uses the host compiler, but it doesn't support setting HOSTCC or HOSTCFLAGS yet. It always just uses 'gcc'. I'll add HOSTCC/HOSTCFLAGS to the TODO list, though feel free to work up a patch. -- Josh