Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 814200 | Differences between
and this patch

Collapse All | Expand All

(-)a/scripts/gcc-plugin.sh (-19 lines)
Lines 1-19 Link Here
1
#!/bin/sh
2
# SPDX-License-Identifier: GPL-2.0
3
4
set -e
5
6
srctree=$(dirname "$0")
7
8
gccplugins_dir=$($* -print-file-name=plugin)
9
10
# we need a c++ compiler that supports the designated initializer GNU extension
11
$HOSTCC -c -x c++ -std=gnu++98 - -fsyntax-only -I $srctree/gcc-plugins -I $gccplugins_dir/include 2>/dev/null <<EOF
12
#include "gcc-common.h"
13
class test {
14
public:
15
	int test;
16
} test = {
17
	.test = 1
18
};
19
EOF
(-)a/scripts/gcc-plugins/Kconfig (-1 / +1 lines)
Lines 9-15 menuconfig GCC_PLUGINS Link Here
9
	bool "GCC plugins"
9
	bool "GCC plugins"
10
	depends on HAVE_GCC_PLUGINS
10
	depends on HAVE_GCC_PLUGINS
11
	depends on CC_IS_GCC
11
	depends on CC_IS_GCC
12
	depends on $(success,$(srctree)/scripts/gcc-plugin.sh $(CC))
12
	depends on $(success,test -e $(shell,$(CC) -print-file-name=plugin)/include/plugin-version.h)
13
	default y
13
	default y
14
	help
14
	help
15
	  GCC plugins are loadable modules that provide extra features to the
15
	  GCC plugins are loadable modules that provide extra features to the
(-)a/scripts/gcc-plugins/Makefile (-2 / +2 lines)
Lines 22-30 always-y += $(GCC_PLUGIN) Link Here
22
GCC_PLUGINS_DIR = $(shell $(CC) -print-file-name=plugin)
22
GCC_PLUGINS_DIR = $(shell $(CC) -print-file-name=plugin)
23
23
24
plugin_cxxflags	= -Wp,-MMD,$(depfile) $(KBUILD_HOSTCXXFLAGS) -fPIC \
24
plugin_cxxflags	= -Wp,-MMD,$(depfile) $(KBUILD_HOSTCXXFLAGS) -fPIC \
25
		   -I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++98 \
25
		   -I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++11 \
26
		   -fno-rtti -fno-exceptions -fasynchronous-unwind-tables \
26
		   -fno-rtti -fno-exceptions -fasynchronous-unwind-tables \
27
		   -ggdb -Wno-narrowing -Wno-unused-variable -Wno-c++11-compat \
27
		   -ggdb -Wno-narrowing -Wno-unused-variable \
28
		   -Wno-format-diag
28
		   -Wno-format-diag
29
29
30
plugin_ldflags	= -shared
30
plugin_ldflags	= -shared

Return to bug 814200