diff mbox series

[5.10,022/104] kbuild: simplify GCC_PLUGINS enablement in dummy-tools/gcc

Message ID 20210215152720.193592547@linuxfoundation.org
State Superseded
Headers show
Series None | expand

Commit Message

Greg Kroah-Hartman Feb. 15, 2021, 3:26 p.m. UTC
From: Masahiro Yamada <masahiroy@kernel.org>

[ Upstream commit f4c3b83b75b91c5059726cb91e3165cc01764ce7 ]

With commit 1e860048c53e ("gcc-plugins: simplify GCC plugin-dev
capability test") applied, this hunk can be way simplified because
now scripts/gcc-plugins/Kconfig only checks plugin-version.h

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 scripts/dummy-tools/gcc | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

Comments

Pavel Machek Feb. 17, 2021, 9:08 a.m. UTC | #1
Hi!

> From: Masahiro Yamada <masahiroy@kernel.org>

> 

> [ Upstream commit f4c3b83b75b91c5059726cb91e3165cc01764ce7 ]

> 

> With commit 1e860048c53e ("gcc-plugins: simplify GCC plugin-dev

> capability test") applied, this hunk can be way simplified because

> now scripts/gcc-plugins/Kconfig only checks plugin-version.h


AFAICT referenced commit 1e860048c53e ("gcc-plugins: simplify GCC
plugin-dev capability test") is not present in 5.10-stable branch, so
I believe this should not be applied, either.

Best regards,
								Pavel
								
> +++ b/scripts/dummy-tools/gcc

> @@ -75,16 +75,12 @@ if arg_contain -S "$@"; then

>  	fi

>  fi

>  

> -# For scripts/gcc-plugin.sh

> +# To set GCC_PLUGINS

>  if arg_contain -print-file-name=plugin "$@"; then

>  	plugin_dir=$(mktemp -d)

>  

> -	sed -n 's/.*#include "\(.*\)"/\1/p' $(dirname $0)/../gcc-plugins/gcc-common.h |

> -	while read header

> -	do

> -		mkdir -p $plugin_dir/include/$(dirname $header)

> -		touch $plugin_dir/include/$header

> -	done

> +	mkdir -p $plugin_dir/include

> +	touch $plugin_dir/include/plugin-version.h

>  

>  	echo $plugin_dir

>  	exit 0


-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Greg Kroah-Hartman Feb. 17, 2021, 9:28 a.m. UTC | #2
On Wed, Feb 17, 2021 at 10:08:54AM +0100, Pavel Machek wrote:
> Hi!

> 

> > From: Masahiro Yamada <masahiroy@kernel.org>

> > 

> > [ Upstream commit f4c3b83b75b91c5059726cb91e3165cc01764ce7 ]

> > 

> > With commit 1e860048c53e ("gcc-plugins: simplify GCC plugin-dev

> > capability test") applied, this hunk can be way simplified because

> > now scripts/gcc-plugins/Kconfig only checks plugin-version.h

> 

> AFAICT referenced commit 1e860048c53e ("gcc-plugins: simplify GCC

> plugin-dev capability test") is not present in 5.10-stable branch, so

> I believe this should not be applied, either.


Good catch, now dropped.

thanks,

greg k-h
diff mbox series

Patch

diff --git a/scripts/dummy-tools/gcc b/scripts/dummy-tools/gcc
index 33487e99d83e5..5c113cad56017 100755
--- a/scripts/dummy-tools/gcc
+++ b/scripts/dummy-tools/gcc
@@ -75,16 +75,12 @@  if arg_contain -S "$@"; then
 	fi
 fi
 
-# For scripts/gcc-plugin.sh
+# To set GCC_PLUGINS
 if arg_contain -print-file-name=plugin "$@"; then
 	plugin_dir=$(mktemp -d)
 
-	sed -n 's/.*#include "\(.*\)"/\1/p' $(dirname $0)/../gcc-plugins/gcc-common.h |
-	while read header
-	do
-		mkdir -p $plugin_dir/include/$(dirname $header)
-		touch $plugin_dir/include/$header
-	done
+	mkdir -p $plugin_dir/include
+	touch $plugin_dir/include/plugin-version.h
 
 	echo $plugin_dir
 	exit 0