Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759618AbcLPJBJ (ORCPT ); Fri, 16 Dec 2016 04:01:09 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:53485 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752959AbcLPJBD (ORCPT ); Fri, 16 Dec 2016 04:01:03 -0500 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 Subject: [PATCH] gcc-plugin: include memmodel.h and tree_vrp.h for gcc-7 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:AOfgKtcFv2jjAqe6D+ONFE+pEAcOjXYY2Y5U1b1Xk4O6uE0r6mC XxkllNzwJMx6lw3lHU0i5iJGCrjevNBdE+4e7da8NzxXMCtYge/Z6totYYoqXO1DWi3FF5C /wjTsvLsK/Nc45pPyCEsR/gwSoJ1K5xY0DQLeNdsfgyLcE/aZ3erX5w9sMcYJxiVZ+aacgT zvT3KAyrcX2LoOcso/2gQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:V6x0f0Hv9RI=:dVngkfcleAT8wdjFr1Jv/O Y3iKtYDlcEZDigUDuOHfBF4CbKq9rj61vgaCprQ18vCAIYuZY9383vqYCtE7X6k5ppLtXpENM Vq21GZG/aU5r2MPo6ho3PGeXFWNx+9JjNs/JX8pkWdN3F/a6+FARiNT9wCOQbjeb3fNbOiqMU RODu2MosM6SPJQe0NWJ+KMFbYTG60cv26o2nA8+ptmsdE5Oa96PomFPo8nR5ra1RRVLBAqyKK jDmMGaiQ5GGj7LbhpjuVnmtLL83J6/NMg1Dz2YQJRQGoJtltmToN121RYDeTzrz4i1MUfcxmN t6bnn5bbBQzCYk+9Vm1hsXRjW903C+k2UJ6e03Cbk51T24pgxe3i5XhAts5cS3BEZklm9Y0qf QGtEjMM7+auQdNeD2yIMnIIMYruRFrdk333T8x4m97sNOa2FyochpDny3q944iGdI8ivexSdo TAMfOQoH9UyGa8+fhCJ3iI5vfuP6q85g3jmMIqFUj11Ptm+QBFjYTIoR+eRWB7L8VXEfzH/0q Wt1SMAxz5xIUoRR3BKoyH4LUysSKV5EeVm63llorb8CSVk9dBn+h+qnwPrSWKaaYc1bxJbmEb vOEMA+JYkmJ9kYLdtexg15CzcLvAb777Czyw/z2YHb4RTOkWxuANgB/fMw86xKUbkg/iv0n+C 6ljECBqQVHUzjj9roiPuomZkMMvQL9ETGsV9mxg1ppLiKWnWv91AVyEMgHvzA7W8lcXsXPGch BlBM6KH5Z7Bi8QQ/ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1849 Lines: 51 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 -- 2.9.0