diff options
author | Andrew Donnellan <andrew.donnellan@au1.ibm.com> | 2016-12-06 01:28:00 -0500 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-02-03 05:59:28 -0500 |
commit | 65c059bcaa73197ca71e8d4cc9a6c903560506c1 (patch) | |
tree | 45509696e28dba816368254c6372b0e9d1f31a7b /scripts/Makefile.gcc-plugins | |
parent | eac6f8b0c7adb003776dbad9d037ee2fc64f9d62 (diff) |
powerpc: Enable support for GCC plugins
Enable support for GCC plugins on powerpc.
Add an additional version check in gcc-plugins-check to advise users to
upgrade to gcc 5.2+ on powerpc to avoid issues with header files (gcc <=
4.6) or missing copies of rs6000-cpus.def (4.8 to 5.1 on 64-bit
targets).
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'scripts/Makefile.gcc-plugins')
-rw-r--r-- | scripts/Makefile.gcc-plugins | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/Makefile.gcc-plugins b/scripts/Makefile.gcc-plugins index 26c67b735dc9..9835a757d52a 100644 --- a/scripts/Makefile.gcc-plugins +++ b/scripts/Makefile.gcc-plugins | |||
@@ -47,6 +47,14 @@ gcc-plugins-check: FORCE | |||
47 | ifdef CONFIG_GCC_PLUGINS | 47 | ifdef CONFIG_GCC_PLUGINS |
48 | ifeq ($(PLUGINCC),) | 48 | ifeq ($(PLUGINCC),) |
49 | ifneq ($(GCC_PLUGINS_CFLAGS),) | 49 | ifneq ($(GCC_PLUGINS_CFLAGS),) |
50 | # Various gccs between 4.5 and 5.1 have bugs on powerpc due to missing | ||
51 | # header files. gcc <= 4.6 doesn't work at all, gccs from 4.8 to 5.1 have | ||
52 | # issues with 64-bit targets. | ||
53 | ifeq ($(ARCH),powerpc) | ||
54 | ifeq ($(call cc-ifversion, -le, 0501, y), y) | ||
55 | @echo "Cannot use CONFIG_GCC_PLUGINS: plugin support on gcc <= 5.1 is buggy on powerpc, please upgrade to gcc 5.2 or newer" >&2 && exit 1 | ||
56 | endif | ||
57 | endif | ||
50 | ifeq ($(call cc-ifversion, -ge, 0405, y), y) | 58 | ifeq ($(call cc-ifversion, -ge, 0405, y), y) |
51 | $(Q)$(srctree)/scripts/gcc-plugin.sh --show-error "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)" || true | 59 | $(Q)$(srctree)/scripts/gcc-plugin.sh --show-error "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)" || true |
52 | @echo "Cannot use CONFIG_GCC_PLUGINS: your gcc installation does not support plugins, perhaps the necessary headers are missing?" >&2 && exit 1 | 60 | @echo "Cannot use CONFIG_GCC_PLUGINS: your gcc installation does not support plugins, perhaps the necessary headers are missing?" >&2 && exit 1 |