From patchwork Fri Dec 16 09:00:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9477575 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AA583607EE for ; Fri, 16 Dec 2016 09:01:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E70526D05 for ; Fri, 16 Dec 2016 09:01:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 908BD28871; Fri, 16 Dec 2016 09:01:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id 9E5F926D05 for ; Fri, 16 Dec 2016 09:01:01 +0000 (UTC) Received: (qmail 25931 invoked by uid 550); 16 Dec 2016 09:00:59 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: kernel-hardening@lists.openwall.com Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 25902 invoked from network); 16 Dec 2016 09:00:57 -0000 From: Arnd Bergmann To: Kees Cook Cc: Kugan , Arnd Bergmann , stable@vger.kernel.org, Emese Revfy , Michal Marek , kernel-hardening@lists.openwall.com, linux-kernel@vger.kernel.org Date: Fri, 16 Dec 2016 10:00:22 +0100 Message-Id: <20161216090033.2007806-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 MIME-Version: 1.0 X-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in: include memmodel.h and tree_vrp.h for gcc-7 X-Virus-Scanned: ClamAV using ClamSMTP Building our gcc plugins currently fails with the gcc-7 snapshots, due to some slightly modified header interfaces: 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 &, This makes it work again, which will be important once we turn the plugins on in allmodconfig by default. It probably also makes sense to backport these to v4.9 and v4.8, which added the header file originally. Cc: stable@vger.kernel.org Suggested-by: Kugan Signed-off-by: Arnd Bergmann --- scripts/gcc-plugins/gcc-common.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h index 950fd2e64bb7..cb4a9518b58a 100644 --- a/scripts/gcc-plugins/gcc-common.h +++ b/scripts/gcc-plugins/gcc-common.h @@ -18,6 +18,9 @@ #include "tree-inline.h" #include "version.h" +#if BUILDING_GCC_VERSION >= 7000 +#include "memmodel.h" +#endif #include "rtl.h" #include "tm_p.h" #include "flags.h" @@ -66,6 +69,9 @@ #include "tree-flow.h" #else #include "tree-cfgcleanup.h" +#if BUILDING_GCC_VERSION >= 7000 +#include "tree-vrp.h" +#endif #include "tree-ssa-operands.h" #include "tree-into-ssa.h" #endif