https://github.com/torvalds/linux
Raw File
Tip revision: 856deb866d16e29bd65952e0289066f6078af773 authored by Linus Torvalds on 13 September 2020, 23:06:00 UTC
Linux 5.9-rc5
Tip revision: 856deb8
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