blob: b79fd0bea83844010355b0daf8fae23bb0435ace [file] [log] [blame]
Emese Revfy6b90bd42016-05-24 00:09:38 +02001#!/bin/sh
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01002# SPDX-License-Identifier: GPL-2.0
Masahiro Yamada77342a02020-03-29 20:08:32 +09003
4set -e
5
Emese Revfy6b90bd42016-05-24 00:09:38 +02006srctree=$(dirname "$0")
Kees Cooked58c0e2016-06-17 23:11:12 -07007
Masahiro Yamada77342a02020-03-29 20:08:32 +09008gccplugins_dir=$($* -print-file-name=plugin)
Emese Revfy6b90bd42016-05-24 00:09:38 +02009
10# we need a c++ compiler that supports the designated initializer GNU extension
Masahiro Yamada77342a02020-03-29 20:08:32 +090011$HOSTCC -c -x c++ -std=gnu++98 - -fsyntax-only -I $srctree/gcc-plugins -I $gccplugins_dir/include 2>/dev/null <<EOF
Emese Revfy6b90bd42016-05-24 00:09:38 +020012#include "gcc-common.h"
13class test {
14public:
15 int test;
16} test = {
17 .test = 1
18};
19EOF