diff options
author | Mike Pagano <mpagano@gentoo.org> | 2021-10-27 10:53:48 -0400 |
---|---|---|
committer | Mike Pagano <mpagano@gentoo.org> | 2021-10-27 10:53:48 -0400 |
commit | 9270a303580a1dbb5f2a8b45bb7972afa8e62d7e (patch) | |
tree | 57b66f0108b9b4810c74d9ab622080c4461ad19b | |
parent | Linux patch 5.10.76 (diff) | |
download | linux-patches-9270a303580a1dbb5f2a8b45bb7972afa8e62d7e.tar.gz linux-patches-9270a303580a1dbb5f2a8b45bb7972afa8e62d7e.tar.bz2 linux-patches-9270a303580a1dbb5f2a8b45bb7972afa8e62d7e.zip |
Fix how gcc version detectioned to make visible CONFIG_GCC_PLUGINS5.10-83
Thanks to Kerin Millar.
Bug: https://bugs.gentoo.org/814200
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
-rw-r--r-- | 0000_README | 4 | ||||
-rw-r--r-- | 2910_fix-gcc-detection-method.patch | 54 |
2 files changed, 58 insertions, 0 deletions
diff --git a/0000_README b/0000_README index 62f163c1..16f83981 100644 --- a/0000_README +++ b/0000_README @@ -363,6 +363,10 @@ Patch: 2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch From: https://bugs.gentoo.org/710790 Desc: tmp513 requies REGMAP_I2C to build. Select it by default in Kconfig. See bug #710790. Thanks to Phil Stracchino +Patch: 2910_fix-gcc-detection-method.patch +From: https://bugs.gentoo.org/814200 +Desc: Fix how gcc version is detected to make visible CONFIG_GCC_PLUGINS. Thanks to Kerin Millar. + Patch: 2920_sign-file-patch-for-libressl.patch From: https://bugs.gentoo.org/717166 Desc: sign-file: full functionality with modern LibreSSL diff --git a/2910_fix-gcc-detection-method.patch b/2910_fix-gcc-detection-method.patch new file mode 100644 index 00000000..470f3afa --- /dev/null +++ b/2910_fix-gcc-detection-method.patch @@ -0,0 +1,54 @@ +diff --git a/scripts/gcc-plugin.sh b/scripts/gcc-plugin.sh +deleted file mode 100755 +index b79fd0bea838..000000000000 +--- a/scripts/gcc-plugin.sh ++++ /dev/null +@@ -1,19 +0,0 @@ +-#!/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 +diff --git a/scripts/gcc-plugins/Kconfig b/scripts/gcc-plugins/Kconfig +index ae19fb0243b9..ab9eb4cbe33a 100644 +--- a/scripts/gcc-plugins/Kconfig ++++ b/scripts/gcc-plugins/Kconfig +@@ -9,7 +9,7 @@ menuconfig GCC_PLUGINS + bool "GCC plugins" + depends on HAVE_GCC_PLUGINS + depends on CC_IS_GCC +- depends on $(success,$(srctree)/scripts/gcc-plugin.sh $(CC)) ++ depends on $(success,test -e $(shell,$(CC) -print-file-name=plugin)/include/plugin-version.h) + default y + help + GCC plugins are loadable modules that provide extra features to the +diff --git a/scripts/gcc-plugins/Makefile b/scripts/gcc-plugins/Makefile +index d66949bfeba4..b5487cce69e8 100644 +--- a/scripts/gcc-plugins/Makefile ++++ b/scripts/gcc-plugins/Makefile +@@ -22,9 +22,9 @@ always-y += $(GCC_PLUGIN) + GCC_PLUGINS_DIR = $(shell $(CC) -print-file-name=plugin) + + plugin_cxxflags = -Wp,-MMD,$(depfile) $(KBUILD_HOSTCXXFLAGS) -fPIC \ +- -I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++98 \ ++ -I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++11 \ + -fno-rtti -fno-exceptions -fasynchronous-unwind-tables \ +- -ggdb -Wno-narrowing -Wno-unused-variable -Wno-c++11-compat \ ++ -ggdb -Wno-narrowing -Wno-unused-variable \ + -Wno-format-diag + + plugin_ldflags = -shared |