All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] kbuild: drop superfluous GCC_PLUGINS_CFLAGS assignment
@ 2018-02-21  4:25 ` Cao jin
  0 siblings, 0 replies; 3+ messages in thread
From: Cao jin @ 2018-02-21  4:25 UTC (permalink / raw
  To: linux-kbuild, linux-kernel; +Cc: yamada.masahiro, michal.lkml, re.emese

GCC_PLUGINS_CFLAGS is already in the environment, so it is superfluous
to add it in commanline of final build of init/

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
---
This is only tested with Randomizing Structure Layout plugin. The test
method is not so grace but I think it can prove the correctness of this
patch. On the other hand, if we concerns that some flags cannot be
passed during final build, should also consider all the other flags.

Currently, with Randomizing plugin enabled, the crash utility can't work
with it, the symptom is a Segmentation fault due to infinite function call.

With the patch, the symptom is exactly the same, so I am sure the plugin works.

 scripts/link-vmlinux.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index e6818b8e7141..e07b2d251ad6 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -248,7 +248,7 @@ else
 fi;
 
 # final build of init/
-${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init GCC_PLUGINS_CFLAGS="${GCC_PLUGINS_CFLAGS}"
+${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init
 
 archive_builtin
 
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH RFC] kbuild: drop superfluous GCC_PLUGINS_CFLAGS assignment
@ 2018-02-21  4:25 ` Cao jin
  0 siblings, 0 replies; 3+ messages in thread
From: Cao jin @ 2018-02-21  4:25 UTC (permalink / raw
  To: linux-kbuild, linux-kernel; +Cc: yamada.masahiro, michal.lkml, re.emese

GCC_PLUGINS_CFLAGS is already in the environment, so it is superfluous
to add it in commanline of final build of init/

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
---
This is only tested with Randomizing Structure Layout plugin. The test
method is not so grace but I think it can prove the correctness of this
patch. On the other hand, if we concerns that some flags cannot be
passed during final build, should also consider all the other flags.

Currently, with Randomizing plugin enabled, the crash utility can't work
with it, the symptom is a Segmentation fault due to infinite function call.

With the patch, the symptom is exactly the same, so I am sure the plugin works.

 scripts/link-vmlinux.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index e6818b8e7141..e07b2d251ad6 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -248,7 +248,7 @@ else
 fi;
 
 # final build of init/
-${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init GCC_PLUGINS_CFLAGS="${GCC_PLUGINS_CFLAGS}"
+${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init
 
 archive_builtin
 
-- 
2.14.3




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH RFC] kbuild: drop superfluous GCC_PLUGINS_CFLAGS assignment
  2018-02-21  4:25 ` Cao jin
  (?)
@ 2018-02-24 14:58 ` Masahiro Yamada
  -1 siblings, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2018-02-24 14:58 UTC (permalink / raw
  To: Cao jin
  Cc: Linux Kbuild mailing list, Linux Kernel Mailing List,
	Michal Marek, Emese Revfy

2018-02-21 13:25 GMT+09:00 Cao jin <caoj.fnst@cn.fujitsu.com>:
> GCC_PLUGINS_CFLAGS is already in the environment, so it is superfluous
> to add it in commanline of final build of init/
>
> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>

Applied to linux-kbuild,
with 'commanline' fixed to 'command line'.




-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-24 14:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-21  4:25 [PATCH RFC] kbuild: drop superfluous GCC_PLUGINS_CFLAGS assignment Cao jin
2018-02-21  4:25 ` Cao jin
2018-02-24 14:58 ` Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.