mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Kees Cook <keescook@chromium.org>
Cc: Kugan <kugan.vivekanandarajah@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>,
	stable@vger.kernel.org, Emese Revfy <re.emese@gmail.com>,
	Michal Marek <mmarek@suse.com>,
	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	[thread overview]
Message-ID: <20161216090033.2007806-1-arnd@arndb.de> (raw)

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 <stdin>: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 <stdin>: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 <kugan.vivekanandarajah@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 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

             reply	other threads:[~2016-12-16  9:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-16  9:00 Arnd Bergmann [this message]
2016-12-16 14:10 ` Emese Revfy
2016-12-16 19:40   ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161216090033.2007806-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=kugan.vivekanandarajah@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.com \
    --cc=re.emese@gmail.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome