1 |
commit: 806549f8ef327ca616f38eaa6549eac8e20c16fb |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Nov 4 11:22:06 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 4 11:22:06 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=806549f8 |
7 |
|
8 |
Upd gcc ver detect patch.Make visible GCC_PLUGINS. Thanks to Kerin Millar. |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
2910_fix-gcc-detection-method.patch | 83 ++++++++++++++++++++++++++++++------- |
13 |
1 file changed, 68 insertions(+), 15 deletions(-) |
14 |
|
15 |
diff --git a/2910_fix-gcc-detection-method.patch b/2910_fix-gcc-detection-method.patch |
16 |
index d7ed901..844b411 100644 |
17 |
--- a/2910_fix-gcc-detection-method.patch |
18 |
+++ b/2910_fix-gcc-detection-method.patch |
19 |
@@ -1,5 +1,21 @@ |
20 |
---- a/scripts/gcc-plugin.sh 2021-09-23 10:18:55.315793245 -0400 |
21 |
-+++ /dev/null 2021-10-27 08:48:41.750968153 -0400 |
22 |
+From 106e2bb6f90409ca0edc77d9b7eba376d1e85876 Mon Sep 17 00:00:00 2001 |
23 |
+From: Kerin Millar <kfm@×××××××××.net> |
24 |
+Date: Thu, 4 Nov 2021 08:44:33 +0000 |
25 |
+Subject: [PATCH] https://bugs.gentoo.org/814200#c20 |
26 |
+ |
27 |
+Signed-off-by: Kerin Millar <kfm@×××××××××.net> |
28 |
+--- |
29 |
+ scripts/gcc-plugin.sh | 66 ------------------------------------ |
30 |
+ scripts/gcc-plugins/Kconfig | 11 ++---- |
31 |
+ scripts/gcc-plugins/Makefile | 19 ++++------- |
32 |
+ 3 files changed, 8 insertions(+), 88 deletions(-) |
33 |
+ delete mode 100755 scripts/gcc-plugin.sh |
34 |
+ |
35 |
+diff --git a/scripts/gcc-plugin.sh b/scripts/gcc-plugin.sh |
36 |
+deleted file mode 100755 |
37 |
+index d3caefe53eab..000000000000 |
38 |
+--- a/scripts/gcc-plugin.sh |
39 |
++++ /dev/null |
40 |
@@ -1,66 +0,0 @@ |
41 |
-#!/bin/sh |
42 |
-# SPDX-License-Identifier: GPL-2.0 |
43 |
@@ -67,9 +83,24 @@ |
44 |
- echo "${plugincc}" >&2 |
45 |
-fi |
46 |
-exit 1 |
47 |
---- a/scripts/gcc-plugins/Kconfig 2021-09-23 10:15:50.898216868 -0400 |
48 |
-+++ b/scripts/gcc-plugins/Kconfig 2021-10-27 11:44:35.700620974 -0400 |
49 |
-@@ -17,7 +17,8 @@ config HAVE_GCC_PLUGINS |
50 |
+diff --git a/scripts/gcc-plugins/Kconfig b/scripts/gcc-plugins/Kconfig |
51 |
+index e3569543bdac..162f17ff01d3 100644 |
52 |
+--- a/scripts/gcc-plugins/Kconfig |
53 |
++++ b/scripts/gcc-plugins/Kconfig |
54 |
+@@ -1,12 +1,4 @@ |
55 |
+ # SPDX-License-Identifier: GPL-2.0-only |
56 |
+-preferred-plugin-hostcc := $(if-success,[ $(gcc-version) -ge 40800 ],$(HOSTCXX),$(HOSTCC)) |
57 |
+- |
58 |
+-config PLUGIN_HOSTCC |
59 |
+- string |
60 |
+- default "$(shell,$(srctree)/scripts/gcc-plugin.sh "$(preferred-plugin-hostcc)" "$(HOSTCXX)" "$(CC)")" if CC_IS_GCC |
61 |
+- help |
62 |
+- Host compiler used to build GCC plugins. This can be $(HOSTCXX), |
63 |
+- $(HOSTCC), or a null string if GCC plugin is unsupported. |
64 |
+ |
65 |
+ config HAVE_GCC_PLUGINS |
66 |
+ bool |
67 |
+@@ -17,7 +9,8 @@ config HAVE_GCC_PLUGINS |
68 |
menuconfig GCC_PLUGINS |
69 |
bool "GCC plugins" |
70 |
depends on HAVE_GCC_PLUGINS |
71 |
@@ -79,14 +110,36 @@ |
72 |
default y |
73 |
help |
74 |
GCC plugins are loadable modules that provide extra features to the |
75 |
---- a/scripts/gcc-plugins/Makefile 2021-10-27 10:58:03.960272437 -0400 |
76 |
-+++ b/scripts/gcc-plugins/Makefile 2021-10-27 10:59:37.313786319 -0400 |
77 |
-@@ -8,7 +8,7 @@ ifeq ($(PLUGINCC),$(HOSTCC)) |
78 |
- export HOST_EXTRACFLAGS |
79 |
- else |
80 |
- HOSTLIBS := hostcxxlibs |
81 |
+diff --git a/scripts/gcc-plugins/Makefile b/scripts/gcc-plugins/Makefile |
82 |
+index 9e95862f2788..e07236375248 100644 |
83 |
+--- a/scripts/gcc-plugins/Makefile |
84 |
++++ b/scripts/gcc-plugins/Makefile |
85 |
+@@ -1,19 +1,12 @@ |
86 |
+ # SPDX-License-Identifier: GPL-2.0 |
87 |
+-PLUGINCC := $(CONFIG_PLUGIN_HOSTCC:"%"=%) |
88 |
+ GCC_PLUGINS_DIR := $(shell $(CC) -print-file-name=plugin) |
89 |
+ |
90 |
+-ifeq ($(PLUGINCC),$(HOSTCC)) |
91 |
+- HOSTLIBS := hostlibs |
92 |
+- HOST_EXTRACFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu99 -ggdb |
93 |
+- export HOST_EXTRACFLAGS |
94 |
+-else |
95 |
+- HOSTLIBS := hostcxxlibs |
96 |
- HOST_EXTRACXXFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu++98 -fno-rtti |
97 |
-+ HOST_EXTRACXXFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu++11 -fno-rtti |
98 |
- HOST_EXTRACXXFLAGS += -fno-exceptions -fasynchronous-unwind-tables -ggdb |
99 |
- HOST_EXTRACXXFLAGS += -Wno-narrowing -Wno-unused-variable |
100 |
- HOST_EXTRACXXFLAGS += -Wno-format-diag |
101 |
+- HOST_EXTRACXXFLAGS += -fno-exceptions -fasynchronous-unwind-tables -ggdb |
102 |
+- HOST_EXTRACXXFLAGS += -Wno-narrowing -Wno-unused-variable |
103 |
+- HOST_EXTRACXXFLAGS += -Wno-format-diag |
104 |
+- export HOST_EXTRACXXFLAGS |
105 |
+-endif |
106 |
++HOSTLIBS := hostcxxlibs |
107 |
++HOST_EXTRACXXFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu++11 -fno-rtti |
108 |
++HOST_EXTRACXXFLAGS += -fno-exceptions -fasynchronous-unwind-tables -ggdb |
109 |
++HOST_EXTRACXXFLAGS += -Wno-narrowing -Wno-unused-variable |
110 |
++HOST_EXTRACXXFLAGS += -Wno-format-diag |
111 |
++export HOST_EXTRACXXFLAGS |
112 |
+ |
113 |
+ $(obj)/randomize_layout_plugin.o: $(objtree)/$(obj)/randomize_layout_seed.h |
114 |
+ quiet_cmd_create_randomize_layout_seed = GENSEED $@ |
115 |
+-- |
116 |
+2.33.1 |
117 |
+ |