acrn-kernel/scripts/gcc-plugins
Sam James ad04399765 gcc-plugins: drop -std=gnu++11 to fix GCC 13 build
[ Upstream commit 5a6b64adc1 ]

The latest GCC 13 snapshot (13.0.1 20230129) gives the following:
```
cc1: error: cannot load plugin ./scripts/gcc-plugins/randomize_layout_plugin.so
 :./scripts/gcc-plugins/randomize_layout_plugin.so: undefined symbol: tree_code_type
```

This ends up being because of https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=b0241ce6e37031
upstream in GCC which changes the visibility of some types used by the kernel's
plugin infrastructure like tree_code_type.

After discussion with the GCC folks, we found that the kernel needs to be building
plugins with the same flags used to build GCC - and GCC defaults to gnu++17
right now. The minimum GCC version needed to build the kernel is GCC 5.1
and GCC 5.1 already defaults to gnu++14 anyway, so just drop the flag, as
all GCCs that could be used to build GCC already default to an acceptable
version which was >= the version we forced via flags until now.

Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108634
Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230201230009.2252783-1-sam@gentoo.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-10 09:33:51 +01:00
..
.gitignore
Kconfig randstruct: Reorganize Kconfigs and attribute macros 2022-05-08 01:33:06 -07:00
Makefile gcc-plugins: drop -std=gnu++11 to fix GCC 13 build 2023-03-10 09:33:51 +01:00
arm_ssp_per_task_plugin.c
gcc-common.h
gcc-generate-gimple-pass.h
gcc-generate-ipa-pass.h
gcc-generate-rtl-pass.h
gcc-generate-simple_ipa-pass.h
latent_entropy_plugin.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_385.RULE 2022-06-10 14:51:36 +02:00
randomize_layout_plugin.c gcc-plugins: use KERNELVERSION for plugin version 2022-05-24 08:25:16 -07:00
sancov_plugin.c gcc-plugins: use KERNELVERSION for plugin version 2022-05-24 08:25:16 -07:00
stackleak_plugin.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_385.RULE 2022-06-10 14:51:36 +02:00
structleak_plugin.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_385.RULE 2022-06-10 14:51:36 +02:00