mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
The GCC plugin feature leads to different kernel configurations on what ought to be equivalent build systems because they depend on the build hosts native compilers rather than the cross compilers needed for the target. This causes problems with module symbol version mismatches. Disable GCC plugins for all build hosts. Advanced build script hackery borrowed from a patch by milhouse. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
21 lines
431 B
Bash
Executable File
21 lines
431 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
exit 1 # Disable plugins
|
|
|
|
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
|