2 # SPDX-License-Identifier: GPL-2.0
3 srctree=$(dirname "$0")
6 if [ "$1" = "--show-error" ] ; then
11 gccplugins_dir=$($3 -print-file-name=plugin)
12 plugincc=$($1 -E -x c++ - -o /dev/null -I"${srctree}"/gcc-plugins -I"${gccplugins_dir}"/include 2>&1 <<EOF
13 #include "gcc-common.h"
14 #if BUILDING_GCC_VERSION >= 4008 || defined(ENABLE_BUILD_WITH_CXX)
24 if [ -n "$SHOW_ERROR" ] ; then
25 echo "${plugincc}" >&2
37 # the c++ compiler needs another test, see below
45 # we need a c++ compiler that supports the designated initializer GNU extension
46 plugincc=$($2 -c -x c++ -std=gnu++98 - -fsyntax-only -I"${srctree}"/gcc-plugins -I"${gccplugins_dir}"/include 2>&1 <<EOF
47 #include "gcc-common.h"
63 if [ -n "$SHOW_ERROR" ] ; then
64 echo "${plugincc}" >&2