From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932110AbcLITkn (ORCPT ); Fri, 9 Dec 2016 14:40:43 -0500 Received: from mail-io0-f195.google.com ([209.85.223.195]:33158 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752965AbcLITka (ORCPT ); Fri, 9 Dec 2016 14:40:30 -0500 MIME-Version: 1.0 In-Reply-To: References: <2680957.ot0HfIkH6p@wuerfel> From: Linus Torvalds Date: Fri, 9 Dec 2016 11:40:29 -0800 X-Google-Sender-Auth: MB2JLHI6L8q30xSCCQhhjPtCvoI Message-ID: Subject: Re: enabling COMPILE_TEST support for GCC plugins in v4.11 To: Kees Cook Cc: Arnd Bergmann , Stephen Rothwell , Randy Dunlap , Olof Johansson , Mark Brown , info@kernelci.org, Andrew Morton , Will Deacon , Russell King - ARM Linux , LKML , Linux-Next , Fengguang Wu , Andrew Donnellan , Michael Ellerman , Laura Abbott , "x86@kernel.org" , PaX Team , Emese Revfy Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 9, 2016 at 11:12 AM, Kees Cook wrote: > > I'm starting to wonder if we need to expose the compiler version to > Kconfig so that "all*config" builds for earlier compiler will > automatically leave things like plugins off. But I have no idea what > the right approach for that might be. We had some broken mock-up of a config option that did a "system()" call to do some shell scripting for filling in config options (ie turn a fail/pass into false/true boolean automatically with something like config COMPILER_SUPPORTS_XYZ bool option shell="gcc -XYZ" The idea is really solid: move a lot of the nasty ad-hoc runtime testing in the Makefiles to the configuration stage. I would seriously like to see this, so that we could replace the stupid CFLAGS_KCOV := $(call cc-option,-fsanitize-coverage=trace-pc,) with just nicer thing (ok, that's a bad example, but some of the other cc-option cases are really pretty fundamental to kernel configuration, and it really matters whether the compiler supports something or not). The main problem was actually that we don't have good infrastructure for passing in the compiler environment etc to kbuild. I forgot who did that mock-up (and what the exact syntax was), but it was pretty simple. Linus