From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756477AbdEDTOS (ORCPT ); Thu, 4 May 2017 15:14:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40757 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752487AbdEDTOL (ORCPT ); Thu, 4 May 2017 15:14:11 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D9A6081247 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jpoimboe@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D9A6081247 Date: Thu, 4 May 2017 14:14:09 -0500 From: Josh Poimboeuf To: Nick Desaulniers Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/build: don't add -maccumulate-outgoing-args w/o compiler support Message-ID: <20170504191409.ptpxg4ooxfqipy3z@treble> References: <20170504062341.20209-1-nick.desaulniers@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170504062341.20209-1-nick.desaulniers@gmail.com> 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.25]); Thu, 04 May 2017 19:14:11 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 03, 2017 at 11:23:41PM -0700, Nick Desaulniers wrote: > Otherwise other compilers, like Clang, are prevented from compiling the > kernel. This flag was introduced in > 3f135e57a4f76d24ae8d8a490314331f0ced40c5. > > Signed-off-by: Nick Desaulniers > --- > arch/x86/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/Makefile b/arch/x86/Makefile > index 4430dd4..5a0ac84 100644 > --- a/arch/x86/Makefile > +++ b/arch/x86/Makefile > @@ -179,7 +179,7 @@ ifdef CONFIG_JUMP_LABEL > endif > > ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1) > - KBUILD_CFLAGS += -maccumulate-outgoing-args > + KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,) > endif I think this might silently cover up errors for older versions of gcc. For example, what happens if '-maccumulate-outgoing-args' is needed, but the version of gcc doesn't support it. In that case I'd rather see gcc report an error that the flag isn't supported, instead of it getting silently disabled. So how about this instead? KBUILD_CFLAGS += $(if $(filter gcc,$(cc-name)),-maccumulate-outgoing-args) -- Josh