Software: Apache. PHP/8.3.27 uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364) Safe-mode: OFF (not secure) /usr/src/linux-headers-6.6.104-grsec-jammy+/scripts/ drwxr-xr-x | |
| Viewing file: Select action/file-type: #!/bin/sh
# SPDX-License-Identifier: GPL-2.0
#
# Test the availability of gcc plugin headers and provide advice on how to
# install them, if they're missing,
#
# Meant to be called via Kconfig.
srctree=$(dirname "$0")
test_compile() {
# we need a c++ compiler that supports the designated initializer GNU extension
$HOSTCC -v -c -x c++ -std=$std - -fsyntax-only -I "$srctree/gcc-plugins" -I "$gccplugin_dir" <<EOF
#include "gcc-common.h"
class test {
public:
int test;
} test = {
.test = 1
};
EOF
}
if [ $# -lt 1 ]; then
echo >&2 "Error: missing arguments!"
echo >&2 ""
echo >&2 "usage: $SHELL $0 CC"
echo >&2 "Test CC for plugin support"
exit 1
fi
gccplugin_dir=$($* -print-file-name=plugin)/include
gccversion=$($* -E -dM - < /dev/null | grep __GNUC__ | sed -ne 's/[^0-9]*//p')
if [ $gccversion -ge 11 ]; then
std=c++11
else
std=gnu++98
fi
if [ $(id -u) -eq 0 ]; then
prompt='#'
else
prompt='$ sudo'
fi
# bail if plugin headers aren't installed
if [ ! -d "$gccplugin_dir" ]; then
echo >&2 "***"
echo >&2 "*** WARNING: gcc plugin headers are missing!"
echo >&2 "***"
echo >&2 "*** Please install the corresponding package, e.g. on Ubuntu:"
echo >&2 "***"
echo >&2 "*** $prompt apt-get install gcc-$gccversion-plugin-dev"
echo >&2 "***"
echo >&2 "*** Or on Fedora:"
echo >&2 "***"
echo >&2 "*** $prompt dnf install gcc-plugin-devel"
echo >&2 "***"
exit 1
fi
test_compile 2>/dev/null && exit 0
# plugin headers are not usable
echo >&2 "***"
echo >&2 "*** WARNING: gcc plugin headers are broken!"
echo >&2 "***"
echo >&2 "*** Full error is:"
test_compile 2>&1 | sed >&2 's/^/*** /'
echo >&2 "***"
echo >&2 "*** Please provide the full log to [email protected]."
exit 1
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0128 ]-- |