diff options
author | Linaro CI <ci_notify@linaro.org> | 2021-01-09 01:41:20 +0000 |
---|---|---|
committer | Linaro CI <ci_notify@linaro.org> | 2021-01-09 01:41:20 +0000 |
commit | c8b68c8e2bb278a438fec149d03f04ddf8c35c97 (patch) | |
tree | 0d9c2298020c3f9b4ea3c0e81fa7be85b3a13787 | |
parent | dbf08c56d7a03d7db009ee4b36b653afe37b91a6 (diff) | |
parent | a1695cea7e1ce7f42d295e4f8dac1cebf278aca0 (diff) |
Merge remote-tracking branch 'plugin-check/tracking-qcomlt-revert-plugin-check' into integration-linux-qcomltintegration-linux-qcomlt-20210109-022440-v5.11-rc2-299-gc8b68c8e2bb27
-rwxr-xr-x | scripts/gcc-plugin.sh | 19 | ||||
-rw-r--r-- | scripts/gcc-plugins/Kconfig | 2 |
2 files changed, 20 insertions, 1 deletions
diff --git a/scripts/gcc-plugin.sh b/scripts/gcc-plugin.sh new file mode 100755 index 000000000000..b79fd0bea838 --- /dev/null +++ b/scripts/gcc-plugin.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +set -e + +srctree=$(dirname "$0") + +gccplugins_dir=$($* -print-file-name=plugin) + +# we need a c++ compiler that supports the designated initializer GNU extension +$HOSTCC -c -x c++ -std=gnu++98 - -fsyntax-only -I $srctree/gcc-plugins -I $gccplugins_dir/include 2>/dev/null <<EOF +#include "gcc-common.h" +class test { +public: + int test; +} test = { + .test = 1 +}; +EOF diff --git a/scripts/gcc-plugins/Kconfig b/scripts/gcc-plugins/Kconfig index ab9eb4cbe33a..ae19fb0243b9 100644 --- a/scripts/gcc-plugins/Kconfig +++ b/scripts/gcc-plugins/Kconfig @@ -9,7 +9,7 @@ menuconfig GCC_PLUGINS bool "GCC plugins" depends on HAVE_GCC_PLUGINS depends on CC_IS_GCC - depends on $(success,test -e $(shell,$(CC) -print-file-name=plugin)/include/plugin-version.h) + depends on $(success,$(srctree)/scripts/gcc-plugin.sh $(CC)) default y help GCC plugins are loadable modules that provide extra features to the |