Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1363796 > unrolled thread
| Started by | Emese Revfy <re.emese@gmail.com> |
|---|---|
| First post | 2016-03-24 01:20 +0100 |
| Last post | 2016-04-02 06:40 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v5 2/5] GCC plugin infrastructure Emese Revfy <re.emese@gmail.com> - 2016-03-24 01:20 +0100
Re: [PATCH v5 2/5] GCC plugin infrastructure Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-03-26 03:40 +0100
Re: [PATCH v5 2/5] GCC plugin infrastructure Emese Revfy <re.emese@gmail.com> - 2016-03-27 23:20 +0200
Re: [PATCH v5 2/5] GCC plugin infrastructure Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-04-02 06:40 +0200
| From | Emese Revfy <re.emese@gmail.com> |
|---|---|
| Date | 2016-03-24 01:20 +0100 |
| Subject | Re: [PATCH v5 2/5] GCC plugin infrastructure |
| Message-ID | <rg1ah-2O3-1@gated-at.bofh.it> |
On Fri, 11 Mar 2016 15:25:19 +0900 Masahiro Yamada <yamada.masahiro@socionext.com> wrote: > You sprinkle "gcc-plugins" target in the top Makefile, which I do not like. > > Can you descend into scripts/gcc-plugins from scripts/Makefile? > > > subdir-$(CONFIG_MODVERSIONS) += genksyms > subdir-y += mod > subdir-$(CONFIG_SECURITY_SELINUX) += selinux > subdir-$(CONFIG_DTC) += dtc > subdir-$(CONFIG_GDB_SCRIPTS) += gdb > +subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins > > > This is how other host tools do, I think. Hi, I tried to remove the gcc-plugins target but sadly in this case the plugins aren't complied. I don't know if I understand how it should work. I pushed a commit: https://github.com/ephox-gcc-plugins/gcc-plugins_linux-next/commit/0b005b886bde6c4b9134d01f830d88d464911a65 Could you please help me with what I did wrong? Thanks -- Emese
[toc] | [next] | [standalone]
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2016-03-26 03:40 +0100 |
| Message-ID | <rgMiR-2y4-3@gated-at.bofh.it> |
| In reply to | #1363796 |
Hi Emese,
2016-03-24 9:07 GMT+09:00 Emese Revfy <re.emese@gmail.com>:
> On Fri, 11 Mar 2016 15:25:19 +0900
> Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
>
>> You sprinkle "gcc-plugins" target in the top Makefile, which I do not like.
>>
>> Can you descend into scripts/gcc-plugins from scripts/Makefile?
>>
>>
>> subdir-$(CONFIG_MODVERSIONS) += genksyms
>> subdir-y += mod
>> subdir-$(CONFIG_SECURITY_SELINUX) += selinux
>> subdir-$(CONFIG_DTC) += dtc
>> subdir-$(CONFIG_GDB_SCRIPTS) += gdb
>> +subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins
>>
>>
>> This is how other host tools do, I think.
>
> Hi,
>
> I tried to remove the gcc-plugins target but sadly in this case the plugins aren't complied.
> I don't know if I understand how it should work. I pushed a commit:
> https://github.com/ephox-gcc-plugins/gcc-plugins_linux-next/commit/0b005b886bde6c4b9134d01f830d88d464911a65
> Could you please help me with what I did wrong?
>
Sorry, I missed this problem.
GCC-plugins must be compiled before descending into ./Kbuild.
Please apply the following on top of commit 0b005b88
and check if it works.
diff --git a/Makefile b/Makefile
index 1c7a379..bd643d3 100644
--- a/Makefile
+++ b/Makefile
@@ -1009,6 +1009,9 @@ archprepare: archheaders archscripts prepare1
scripts_basic
prepare0: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
prepare0: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
prepare0: archprepare FORCE
+ifdef CONFIG_GCC_PLUGINS
+ $(Q)$(MAKE) $(build)=scripts/gcc-plugins
+endif
$(Q)$(MAKE) $(build)=.
# All the preparing..
diff --git a/scripts/Makefile b/scripts/Makefile
index 0ba652c..1d80897 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -45,7 +45,6 @@ subdir-y += mod
subdir-$(CONFIG_SECURITY_SELINUX) += selinux
subdir-$(CONFIG_DTC) += dtc
subdir-$(CONFIG_GDB_SCRIPTS) += gdb
-subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins
# Let clean descend into subdirs
-subdir- += basic kconfig package
+subdir- += basic kconfig package gcc-plugins
--
Best Regards
Masahiro Yamada
[toc] | [prev] | [next] | [standalone]
| From | Emese Revfy <re.emese@gmail.com> |
|---|---|
| Date | 2016-03-27 23:20 +0200 |
| Message-ID | <rhqgi-5D2-11@gated-at.bofh.it> |
| In reply to | #1364902 |
On Sat, 26 Mar 2016 11:39:32 +0900 Masahiro Yamada <yamada.masahiro@socionext.com> wrote: > > I tried to remove the gcc-plugins target but sadly in this case the plugins aren't complied. > > I don't know if I understand how it should work. I pushed a commit: > > https://github.com/ephox-gcc-plugins/gcc-plugins_linux-next/commit/0b005b886bde6c4b9134d01f830d88d464911a65 > > Could you please help me with what I did wrong? > > > Sorry, I missed this problem. > > GCC-plugins must be compiled before descending into ./Kbuild. > > > Please apply the following on top of commit 0b005b88 > and check if it works. > > diff --git a/Makefile b/Makefile > index 1c7a379..bd643d3 100644 > --- a/Makefile > +++ b/Makefile > @@ -1009,6 +1009,9 @@ archprepare: archheaders archscripts prepare1 > scripts_basic > prepare0: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS) > prepare0: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS) > prepare0: archprepare FORCE > +ifdef CONFIG_GCC_PLUGINS > + $(Q)$(MAKE) $(build)=scripts/gcc-plugins > +endif > $(Q)$(MAKE) $(build)=. > > # All the preparing.. > diff --git a/scripts/Makefile b/scripts/Makefile > index 0ba652c..1d80897 100644 > --- a/scripts/Makefile > +++ b/scripts/Makefile > @@ -45,7 +45,6 @@ subdir-y += mod > subdir-$(CONFIG_SECURITY_SELINUX) += selinux > subdir-$(CONFIG_DTC) += dtc > subdir-$(CONFIG_GDB_SCRIPTS) += gdb > -subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins > > # Let clean descend into subdirs > -subdir- += basic kconfig package > +subdir- += basic kconfig package gcc-plugins Thanks for the patch. I tested it and there is a problem when I run a parallel make. The plugins are compiled later than needed (e.g., scripts/mod/empty.o). There is a lot of important code under scripts/mod which may need the plugins. If the plugins were compiled when the "scripts_basic" target runs it would be good but unfortunately the config symbol CONFIG_GCC_PLUGINS doesn't seem to be defined yet. Could you please help me solve this problem? -- Emese
[toc] | [prev] | [next] | [standalone]
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2016-04-02 06:40 +0200 |
| Message-ID | <rjlvP-6Qc-7@gated-at.bofh.it> |
| In reply to | #1365192 |
Hi Emese,
Sorry for my late reply.
> Thanks for the patch. I tested it and there is a problem when I run a parallel make.
> The plugins are compiled later than needed (e.g., scripts/mod/empty.o). There is a lot of important
> code under scripts/mod which may need the plugins.
Ah, I missed that.
> If the plugins were compiled when the "scripts_basic"
> target runs it would be good but unfortunately the config symbol CONFIG_GCC_PLUGINS doesn't seem to be defined yet.
> Could you please help me solve this problem?
How about this?
It should apply on commit 0b005b886bde6c4b9134d01f830d88d464911a65
of your tree.
diff --git a/Makefile b/Makefile
index 1c7a379..d3518e0 100644
--- a/Makefile
+++ b/Makefile
@@ -550,7 +550,7 @@ ifeq ($(KBUILD_EXTMOD),)
# in parallel
PHONY += scripts
scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \
- asm-generic
+ asm-generic gcc-plugins
$(Q)$(MAKE) $(build)=$(@)
# Objects we will link into vmlinux / subdirs we need to visit
@@ -625,6 +625,13 @@ endif
# Tell gcc to never replace conditional load with a non-conditional one
KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0)
+PHONY += gcc-plugins
+gcc-plugins: scripts_basic
+ifdef CONFIG_GCC_PLUGINS
+ $(Q)$(MAKE) $(build)=scripts/gcc-plugins
+endif
+ @:
+
include scripts/Makefile.gcc-plugins
ifdef CONFIG_READABLE_ASM
@@ -1008,7 +1015,7 @@ archprepare: archheaders archscripts prepare1
scripts_basic
prepare0: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
prepare0: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
-prepare0: archprepare FORCE
+prepare0: archprepare gcc-plugins FORCE
$(Q)$(MAKE) $(build)=.
# All the preparing..
diff --git a/scripts/Makefile b/scripts/Makefile
index 0ba652c..1d80897 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -45,7 +45,6 @@ subdir-y += mod
subdir-$(CONFIG_SECURITY_SELINUX) += selinux
subdir-$(CONFIG_DTC) += dtc
subdir-$(CONFIG_GDB_SCRIPTS) += gdb
-subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins
# Let clean descend into subdirs
-subdir- += basic kconfig package
+subdir- += basic kconfig package gcc-plugins
--
Best Regards
Masahiro Yamada
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web