Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752295AbcLIUhL convert rfc822-to-8bit (ORCPT ); Fri, 9 Dec 2016 15:37:11 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:61269 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751143AbcLIUhJ (ORCPT ); Fri, 9 Dec 2016 15:37:09 -0500 From: Arnd Bergmann To: Kees Cook Cc: Stephen Rothwell , Randy Dunlap , Olof Johansson , Mark Brown , info@kernelci.org, Linus Torvalds , 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 , maxim.kuvyrkov@linaro.org, Kugan Vivekanandarajah Subject: Re: enabling COMPILE_TEST support for GCC plugins in v4.11 Date: Fri, 09 Dec 2016 21:35:54 +0100 Message-ID: <4284516.VtSFlm1aM8@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: <5572017.jUy2fe8FTb@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K0:qWlyENXljKkvv0QzPRrYUq4iV7/uHyUxS5BrVKrWfTDbOGiw3eu ChP6mrQ1AcSILjtbX9MeAnhpwVsfMNMwYU14wvgTJLkKkwG1hFMI83YojIKJXFqyxDb5IY0 8Tikm9G+grNWCLtFDXGP9YDdM5Es+PhjNxGufAF/EL1YZ6W9alvPm0J8NVlLwUBSMApRQtY ZRqxuK7ZBLdJXBRJGnQiQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:yeGjY+p8A74=:DOr4xFLqxRx0RJa9DrRcW9 xpomAYBZlZ8WTMjthdmCxPaVG7A0v4w0W0OhD5ueaM9igRT9iUau4mbuKPTGES/f+bq6VMrrg ZDLBVCL2PbHYzmDNARcIoHUDS9USAO3SGLyI/hWbyI5FiKhMuU+e8NSqCzmKcJBFtQs4QKnav fHN6kRQT3T5XpEooDm2doMOKdwCgFtRNcvnyqhRbXqLktfwRkXH7+jhp3BLTVvT1D42b/5XW/ U1GQz247RP0xB0a5ju4bLp8kohM7hXXPHb60qp06csiqP/wneWh7fPEl2pJAH7AWCGpeAbGaS iQop/tkBo18CkaNTEVwdmSD+PheVuKg2siSBFNFoIyxhbgpMVdARLDNVaaHBbTDHAbBbyABXr LmGMXawfeK/8wUjZ8Q+0oXhqdY5X7+M1MwrCUqc9s09dSbSaScwZfZ8KFL64sqpgDTcyq21jz s+9C/CLPr3qw2W979AzteruFiVqqMWJpRCQaHO7tsnUbB72XxwNLh23ICj/GcVNYJ9vngK09e 7js++b68m7Qz+/6Jzi0YEhCPLRjGbut9w7naNRDI9EeG2o093+dZWdgvXUa+mZcHPQKdMZSwM lcdqjbEHKPrfMhKIFUGXU1kXDM+8SlLhcKpjYnPAKcW6mtQyxnjVp+exq9CShI1IilaY79sMK 3UobjEe5J/WTfqgfPMBzVQ58zsnIhFUJKQf/II8c3lqNYPcYQYLRI2yEoqs6/2NGLJOPFqz45 Hip6fAccZ+3VVJYO Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2744 Lines: 46 On Friday, December 9, 2016 11:13:20 AM CET Kees Cook wrote: > On Fri, Dec 9, 2016 at 3:33 AM, Arnd Bergmann wrote: > > On Thursday, December 8, 2016 11:00:42 AM CET Kees Cook wrote: > >> If you have a moment, applying 215e2aa6c024[1] and reverting > >> a519167e753e for an allyesconfig/allmodconfig build should let you > >> know if things are working correctly with headers installed. If anyone > >> sees any problems, please let me know and I can queue up fixes. > >> > > This is what I got on x86-64 with a gcc-7.0.0 snapshot: > > > > In file included from /git/arm-soc/scripts/gcc-plugins/gcc-common.h:42:0, > > from :1: > > /home/arnd/cross-gcc/lib/gcc/x86_64-linux/7.0.0/plugin/include/emit-rtl.h:371:41: error: use of enum ‘memmodel’ without previous declaration > > extern bool need_atomic_barrier_p (enum memmodel, bool); > > ^ > > In file included from /git/arm-soc/scripts/gcc-plugins/gcc-common.h:94:0, > > from :1: > > /home/arnd/cross-gcc/lib/gcc/x86_64-linux/7.0.0/plugin/include/tree-ssanames.h:70:40: error: use of enum ‘value_range_type’ without previous declaration > > extern void set_range_info (tree, enum value_range_type, const wide_int_ref &, > > ^ > > /home/arnd/cross-gcc/lib/gcc/x86_64-linux/7.0.0/plugin/include/tree-ssanames.h:73:13: error: use of enum ‘value_range_type’ without previous declaration > > extern enum value_range_type get_range_info (const_tree, wide_int *, > > ^ > > /home/arnd/cross-gcc/lib/gcc/x86_64-linux/7.0.0/plugin/include/tree-ssanames.h:98:55: error: use of enum ‘value_range_type’ without previous declaration > > extern void duplicate_ssa_name_range_info (tree, enum value_range_type, > > ^ > > Cannot use CONFIG_GCC_PLUGINS: your gcc installation does not support plugins, perhaps the necessary headers are missing? > > scripts/Makefile.gcc-plugins:51: recipe for target 'gcc-plugins-check' failed > > > > I manually fixed up the gcc header files to include the ones with the > > definition for now, to address those, but I don't know if that change is > > correct. > > What was needed? I added '#include "memmodel.h"' and '#include "tree-vrp.h"', respectively, to the headers that failed to get compiled. This might be the correct solution, or the headers might not be meant to be used standalone and instead require being included in the right order. Gcc commit svn+ssh://gcc.gnu.org/svn/gcc/trunk@239638 moved value_range_type from tree-ssanames.h to tree-vrp.h, I've added Kugan to Cc, maybe he can clarify what that means for plugins. Arnd