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