2016-05-24 00:09:38 +02:00
|
|
|
#!/bin/sh
|
2017-11-01 15:07:57 +01:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2020-03-29 20:08:32 +09:00
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
2016-05-24 00:09:38 +02:00
|
|
|
srctree=$(dirname "$0")
|
2016-06-17 23:11:12 -07:00
|
|
|
|
2020-03-29 20:08:32 +09:00
|
|
|
gccplugins_dir=$($* -print-file-name=plugin)
|
2016-05-24 00:09:38 +02:00
|
|
|
|
|
|
|
|
# we need a c++ compiler that supports the designated initializer GNU extension
|
2020-03-29 20:08:32 +09:00
|
|
|
$HOSTCC -c -x c++ -std=gnu++98 - -fsyntax-only -I $srctree/gcc-plugins -I $gccplugins_dir/include 2>/dev/null <<EOF
|
2016-05-24 00:09:38 +02:00
|
|
|
#include "gcc-common.h"
|
|
|
|
|
class test {
|
|
|
|
|
public:
|
|
|
|
|
int test;
|
|
|
|
|
} test = {
|
|
|
|
|
.test = 1
|
|
|
|
|
};
|
|
|
|
|
EOF
|