Files
kernel/scripts/gcc-plugin.sh
T

20 lines
406 B
Bash
Raw Normal View History

2016-05-24 00:09:38 +02:00
#!/bin/sh
# 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")
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