Commit | Line | Data |
---|---|---|
6b90bd4b | 1 | #!/bin/sh |
b2441318 | 2 | # SPDX-License-Identifier: GPL-2.0 |
6b90bd4b | 3 | |
77342a02 | 4 | set -e |
6b90bd4b | 5 | |
77342a02 | 6 | srctree=$(dirname "$0") |
6b90bd4b | 7 | |
77342a02 | 8 | gccplugins_dir=$($* -print-file-name=plugin) |
6b90bd4b ER |
9 | |
10 | # we need a c++ compiler that supports the designated initializer GNU extension | |
77342a02 | 11 | $HOSTCC -c -x c++ -std=gnu++98 - -fsyntax-only -I $srctree/gcc-plugins -I $gccplugins_dir/include 2>/dev/null <<EOF |
6b90bd4b ER |
12 | #include "gcc-common.h" |
13 | class test { | |
14 | public: | |
15 | int test; | |
16 | } test = { | |
17 | .test = 1 | |
18 | }; | |
19 | EOF |