Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 748560 Details for
Bug 814200
sys-kernel/gentoo-sources: GCC_PLUGINS are forcibly disabled if gcc-11 is the active compiler
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Somewhat simpler patch, tested on 5.4 (corrected)
0001-https-bugs.gentoo.org-814200-c20.patch (text/plain), 4.04 KB, created by
kfm
on 2021-11-04 08:50:19 UTC
(
hide
)
Description:
Somewhat simpler patch, tested on 5.4 (corrected)
Filename:
MIME Type:
Creator:
kfm
Created:
2021-11-04 08:50:19 UTC
Size:
4.04 KB
patch
obsolete
>From 106e2bb6f90409ca0edc77d9b7eba376d1e85876 Mon Sep 17 00:00:00 2001 >From: Kerin Millar <kfm@plushkava.net> >Date: Thu, 4 Nov 2021 08:44:33 +0000 >Subject: [PATCH] https://bugs.gentoo.org/814200#c20 > >Signed-off-by: Kerin Millar <kfm@plushkava.net> >--- > scripts/gcc-plugin.sh | 66 ------------------------------------ > scripts/gcc-plugins/Kconfig | 11 ++---- > scripts/gcc-plugins/Makefile | 19 ++++------- > 3 files changed, 8 insertions(+), 88 deletions(-) > delete mode 100755 scripts/gcc-plugin.sh > >diff --git a/scripts/gcc-plugin.sh b/scripts/gcc-plugin.sh >deleted file mode 100755 >index d3caefe53eab..000000000000 >--- a/scripts/gcc-plugin.sh >+++ /dev/null >@@ -1,66 +0,0 @@ >-#!/bin/sh >-# SPDX-License-Identifier: GPL-2.0 >-srctree=$(dirname "$0") >- >-SHOW_ERROR= >-if [ "$1" = "--show-error" ] ; then >- SHOW_ERROR=1 >- shift || true >-fi >- >-gccplugins_dir=$($3 -print-file-name=plugin) >-plugincc=$($1 -E -x c++ - -o /dev/null -I"${srctree}"/gcc-plugins -I"${gccplugins_dir}"/include 2>&1 <<EOF >-#include "gcc-common.h" >-#if BUILDING_GCC_VERSION >= 4008 || defined(ENABLE_BUILD_WITH_CXX) >-#warning $2 CXX >-#else >-#warning $1 CC >-#endif >-EOF >-) >- >-if [ $? -ne 0 ] >-then >- if [ -n "$SHOW_ERROR" ] ; then >- echo "${plugincc}" >&2 >- fi >- exit 1 >-fi >- >-case "$plugincc" in >- *"$1 CC"*) >- echo "$1" >- exit 0 >- ;; >- >- *"$2 CXX"*) >- # the c++ compiler needs another test, see below >- ;; >- >- *) >- exit 1 >- ;; >-esac >- >-# we need a c++ compiler that supports the designated initializer GNU extension >-plugincc=$($2 -c -x c++ -std=gnu++98 - -fsyntax-only -I"${srctree}"/gcc-plugins -I"${gccplugins_dir}"/include 2>&1 <<EOF >-#include "gcc-common.h" >-class test { >-public: >- int test; >-} test = { >- .test = 1 >-}; >-EOF >-) >- >-if [ $? -eq 0 ] >-then >- echo "$2" >- exit 0 >-fi >- >-if [ -n "$SHOW_ERROR" ] ; then >- echo "${plugincc}" >&2 >-fi >-exit 1 >diff --git a/scripts/gcc-plugins/Kconfig b/scripts/gcc-plugins/Kconfig >index e3569543bdac..162f17ff01d3 100644 >--- a/scripts/gcc-plugins/Kconfig >+++ b/scripts/gcc-plugins/Kconfig >@@ -1,12 +1,4 @@ > # SPDX-License-Identifier: GPL-2.0-only >-preferred-plugin-hostcc := $(if-success,[ $(gcc-version) -ge 40800 ],$(HOSTCXX),$(HOSTCC)) >- >-config PLUGIN_HOSTCC >- string >- default "$(shell,$(srctree)/scripts/gcc-plugin.sh "$(preferred-plugin-hostcc)" "$(HOSTCXX)" "$(CC)")" if CC_IS_GCC >- help >- Host compiler used to build GCC plugins. This can be $(HOSTCXX), >- $(HOSTCC), or a null string if GCC plugin is unsupported. > > config HAVE_GCC_PLUGINS > bool >@@ -17,7 +9,8 @@ config HAVE_GCC_PLUGINS > menuconfig GCC_PLUGINS > bool "GCC plugins" > depends on HAVE_GCC_PLUGINS >- depends on PLUGIN_HOSTCC != "" >+ depends on CC_IS_GCC >+ 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 9e95862f2788..e07236375248 100644 >--- a/scripts/gcc-plugins/Makefile >+++ b/scripts/gcc-plugins/Makefile >@@ -1,19 +1,12 @@ > # SPDX-License-Identifier: GPL-2.0 >-PLUGINCC := $(CONFIG_PLUGIN_HOSTCC:"%"=%) > GCC_PLUGINS_DIR := $(shell $(CC) -print-file-name=plugin) > >-ifeq ($(PLUGINCC),$(HOSTCC)) >- HOSTLIBS := hostlibs >- HOST_EXTRACFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu99 -ggdb >- export HOST_EXTRACFLAGS >-else >- HOSTLIBS := hostcxxlibs >- HOST_EXTRACXXFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu++98 -fno-rtti >- HOST_EXTRACXXFLAGS += -fno-exceptions -fasynchronous-unwind-tables -ggdb >- HOST_EXTRACXXFLAGS += -Wno-narrowing -Wno-unused-variable >- HOST_EXTRACXXFLAGS += -Wno-format-diag >- export HOST_EXTRACXXFLAGS >-endif >+HOSTLIBS := hostcxxlibs >+HOST_EXTRACXXFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu++11 -fno-rtti >+HOST_EXTRACXXFLAGS += -fno-exceptions -fasynchronous-unwind-tables -ggdb >+HOST_EXTRACXXFLAGS += -Wno-narrowing -Wno-unused-variable >+HOST_EXTRACXXFLAGS += -Wno-format-diag >+export HOST_EXTRACXXFLAGS > > $(obj)/randomize_layout_plugin.o: $(objtree)/$(obj)/randomize_layout_seed.h > quiet_cmd_create_randomize_layout_seed = GENSEED $@ >-- >2.33.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 814200
:
740556
|
740934
|
746715
| 748560