Skip to content

Commit 8034c2f

Browse files
committed
gcc-plugins: move GCC version check for PowerPC to Kconfig
For PowerPC, GCC 5.2 is the requirement for GCC plugins. Move the version check to Kconfig so that the GCC plugin menus will be hidden if an older compiler is in use. Signed-off-by: Masahiro Yamada <[email protected]> Acked-by: Andrew Donnellan <[email protected]> Reviewed-by: Kees Cook <[email protected]>
1 parent 5aadfde commit 8034c2f

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

arch/powerpc/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ config PPC
189189
select HAVE_FTRACE_MCOUNT_RECORD
190190
select HAVE_FUNCTION_GRAPH_TRACER
191191
select HAVE_FUNCTION_TRACER
192-
select HAVE_GCC_PLUGINS
192+
select HAVE_GCC_PLUGINS if GCC_VERSION >= 50200 # plugin support on gcc <= 5.1 is buggy on PPC
193193
select HAVE_GENERIC_GUP
194194
select HAVE_HW_BREAKPOINT if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx)
195195
select HAVE_IDE

scripts/Makefile.gcc-plugins

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,6 @@ gcc-plugins-check: FORCE
5353
ifdef CONFIG_GCC_PLUGINS
5454
ifeq ($(PLUGINCC),)
5555
ifneq ($(GCC_PLUGINS_CFLAGS),)
56-
# Various gccs between 4.5 and 5.1 have bugs on powerpc due to missing
57-
# header files. gcc <= 4.6 doesn't work at all, gccs from 4.8 to 5.1 have
58-
# issues with 64-bit targets.
59-
ifeq ($(ARCH),powerpc)
60-
ifeq ($(call cc-ifversion, -le, 0501, y), y)
61-
@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
62-
endif
63-
endif
6456
ifeq ($(call cc-ifversion, -ge, 0405, y), y)
6557
$(Q)$(srctree)/scripts/gcc-plugin.sh --show-error "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)" || true
6658
@echo "Cannot use CONFIG_GCC_PLUGINS: your gcc installation does not support plugins, perhaps the necessary headers are missing?" >&2 && exit 1

0 commit comments

Comments
 (0)