Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:5.10 commit in: /
Date: Wed, 27 Oct 2021 14:55:19
Message-Id: 1635346428.9270a303580a1dbb5f2a8b45bb7972afa8e62d7e.mpagano@gentoo
1 commit: 9270a303580a1dbb5f2a8b45bb7972afa8e62d7e
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 27 14:53:48 2021 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 27 14:53:48 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=9270a303
7
8 Fix how gcc version detectioned to make visible CONFIG_GCC_PLUGINS
9
10 Thanks to Kerin Millar.
11
12 Bug: https://bugs.gentoo.org/814200
13
14 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
15
16 0000_README | 4 +++
17 2910_fix-gcc-detection-method.patch | 54 +++++++++++++++++++++++++++++++++++++
18 2 files changed, 58 insertions(+)
19
20 diff --git a/0000_README b/0000_README
21 index 62f163c..16f8398 100644
22 --- a/0000_README
23 +++ b/0000_README
24 @@ -363,6 +363,10 @@ Patch: 2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch
25 From: https://bugs.gentoo.org/710790
26 Desc: tmp513 requies REGMAP_I2C to build. Select it by default in Kconfig. See bug #710790. Thanks to Phil Stracchino
27
28 +Patch: 2910_fix-gcc-detection-method.patch
29 +From: https://bugs.gentoo.org/814200
30 +Desc: Fix how gcc version is detected to make visible CONFIG_GCC_PLUGINS. Thanks to Kerin Millar.
31 +
32 Patch: 2920_sign-file-patch-for-libressl.patch
33 From: https://bugs.gentoo.org/717166
34 Desc: sign-file: full functionality with modern LibreSSL
35
36 diff --git a/2910_fix-gcc-detection-method.patch b/2910_fix-gcc-detection-method.patch
37 new file mode 100644
38 index 0000000..470f3af
39 --- /dev/null
40 +++ b/2910_fix-gcc-detection-method.patch
41 @@ -0,0 +1,54 @@
42 +diff --git a/scripts/gcc-plugin.sh b/scripts/gcc-plugin.sh
43 +deleted file mode 100755
44 +index b79fd0bea838..000000000000
45 +--- a/scripts/gcc-plugin.sh
46 ++++ /dev/null
47 +@@ -1,19 +0,0 @@
48 +-#!/bin/sh
49 +-# SPDX-License-Identifier: GPL-2.0
50 +-
51 +-set -e
52 +-
53 +-srctree=$(dirname "$0")
54 +-
55 +-gccplugins_dir=$($* -print-file-name=plugin)
56 +-
57 +-# we need a c++ compiler that supports the designated initializer GNU extension
58 +-$HOSTCC -c -x c++ -std=gnu++98 - -fsyntax-only -I $srctree/gcc-plugins -I $gccplugins_dir/include 2>/dev/null <<EOF
59 +-#include "gcc-common.h"
60 +-class test {
61 +-public:
62 +- int test;
63 +-} test = {
64 +- .test = 1
65 +-};
66 +-EOF
67 +diff --git a/scripts/gcc-plugins/Kconfig b/scripts/gcc-plugins/Kconfig
68 +index ae19fb0243b9..ab9eb4cbe33a 100644
69 +--- a/scripts/gcc-plugins/Kconfig
70 ++++ b/scripts/gcc-plugins/Kconfig
71 +@@ -9,7 +9,7 @@ menuconfig GCC_PLUGINS
72 + bool "GCC plugins"
73 + depends on HAVE_GCC_PLUGINS
74 + depends on CC_IS_GCC
75 +- depends on $(success,$(srctree)/scripts/gcc-plugin.sh $(CC))
76 ++ depends on $(success,test -e $(shell,$(CC) -print-file-name=plugin)/include/plugin-version.h)
77 + default y
78 + help
79 + GCC plugins are loadable modules that provide extra features to the
80 +diff --git a/scripts/gcc-plugins/Makefile b/scripts/gcc-plugins/Makefile
81 +index d66949bfeba4..b5487cce69e8 100644
82 +--- a/scripts/gcc-plugins/Makefile
83 ++++ b/scripts/gcc-plugins/Makefile
84 +@@ -22,9 +22,9 @@ always-y += $(GCC_PLUGIN)
85 + GCC_PLUGINS_DIR = $(shell $(CC) -print-file-name=plugin)
86 +
87 + plugin_cxxflags = -Wp,-MMD,$(depfile) $(KBUILD_HOSTCXXFLAGS) -fPIC \
88 +- -I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++98 \
89 ++ -I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++11 \
90 + -fno-rtti -fno-exceptions -fasynchronous-unwind-tables \
91 +- -ggdb -Wno-narrowing -Wno-unused-variable -Wno-c++11-compat \
92 ++ -ggdb -Wno-narrowing -Wno-unused-variable \
93 + -Wno-format-diag
94 +
95 + plugin_ldflags = -shared