swh:1:snp:c2847dfd741eae21606027cf29250d1ebcd63fb4
Raw File
Tip revision: dcb7fd82c75ee2d6e6f9d8cc71c52519ed52e258 authored by Linus Torvalds on 05 July 2020, 23:20:22 UTC
Linux 5.8-rc4
Tip revision: dcb7fd8
gcc-plugin.sh
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0

set -e

srctree=$(dirname "$0")

gccplugins_dir=$($* -print-file-name=plugin)

# we need a c++ compiler that supports the designated initializer GNU extension
$HOSTCC -c -x c++ -std=gnu++98 - -fsyntax-only -I $srctree/gcc-plugins -I $gccplugins_dir/include 2>/dev/null <<EOF
#include "gcc-common.h"
class test {
public:
	int test;
} test = {
	.test = 1
};
EOF
back to top