linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kbuild: use -Oz instead of -Os when using clang
@ 2017-03-28  1:19 Matthias Kaehlcke
  2017-03-30 16:03 ` Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Matthias Kaehlcke @ 2017-03-28  1:19 UTC (permalink / raw)
  To: Michal Marek
  Cc: linux-kbuild, linux-kernel, Behan Webster, Greg Hackmann,
	Grant Grundler, Michael Davidson, Peter Foley, Matthias Kaehlcke

This generates smaller resulting object code when compiled with clang.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index b2faa9319372..66bcdbf58371 100644
--- a/Makefile
+++ b/Makefile
@@ -638,7 +638,8 @@ KBUILD_CFLAGS	+= $(call cc-option,-fdata-sections,)
 endif
 
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
-KBUILD_CFLAGS	+= -Os $(call cc-disable-warning,maybe-uninitialized,)
+KBUILD_CFLAGS	+= $(call cc-option,-Oz,-Os)
+KBUILD_CFLAGS	+= $(call cc-disable-warning,maybe-uninitialized,)
 else
 ifdef CONFIG_PROFILE_ALL_BRANCHES
 KBUILD_CFLAGS	+= -O2 $(call cc-disable-warning,maybe-uninitialized,)
-- 
2.12.2.564.g063fe858b8-goog

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

* Re: [PATCH] kbuild: use -Oz instead of -Os when using clang
  2017-03-28  1:19 [PATCH] kbuild: use -Oz instead of -Os when using clang Matthias Kaehlcke
@ 2017-03-30 16:03 ` Masahiro Yamada
  2017-03-30 16:41   ` Matthias Kaehlcke
  0 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2017-03-30 16:03 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Michal Marek, Linux Kbuild mailing list,
	Linux Kernel Mailing List, Behan Webster, Greg Hackmann,
	Grant Grundler, Michael Davidson, Peter Foley

2017-03-28 10:19 GMT+09:00 Matthias Kaehlcke <mka@chromium.org>:
> This generates smaller resulting object code when compiled with clang.
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
>  Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index b2faa9319372..66bcdbf58371 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -638,7 +638,8 @@ KBUILD_CFLAGS       += $(call cc-option,-fdata-sections,)
>  endif
>
>  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
> -KBUILD_CFLAGS  += -Os $(call cc-disable-warning,maybe-uninitialized,)
> +KBUILD_CFLAGS  += $(call cc-option,-Oz,-Os)
> +KBUILD_CFLAGS  += $(call cc-disable-warning,maybe-uninitialized,)
>  else
>  ifdef CONFIG_PROFILE_ALL_BRANCHES
>  KBUILD_CFLAGS  += -O2 $(call cc-disable-warning,maybe-uninitialized,)
> --
> 2.12.2.564.g063fe858b8-goog
>



This is the same as the following commit in LLVMLinux
except Author/Signed-off-by.

Who should the authorship really belong to?



commit 186e62808239c603bfa308d5ea994a10d67bb409
Author: Behan Webster <behanw@converseincode.com>
Date:   Thu Oct 16 14:28:54 2014 +0200

    LLVMLinux: use -Oz instead of -Os when using clang

    This generates smaller resulting object code when compiled with clang.

    Signed-off-by: Behan Webster <behanw@converseincode.com>


-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] kbuild: use -Oz instead of -Os when using clang
  2017-03-30 16:03 ` Masahiro Yamada
@ 2017-03-30 16:41   ` Matthias Kaehlcke
  2017-03-30 17:57     ` Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Matthias Kaehlcke @ 2017-03-30 16:41 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Michal Marek, Linux Kbuild mailing list,
	Linux Kernel Mailing List, Behan Webster, Greg Hackmann,
	Grant Grundler, Michael Davidson, Peter Foley

El Fri, Mar 31, 2017 at 01:03:02AM +0900 Masahiro Yamada ha dit:

> 2017-03-28 10:19 GMT+09:00 Matthias Kaehlcke <mka@chromium.org>:
> > This generates smaller resulting object code when compiled with clang.
> >
> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> > ---
> >  Makefile | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/Makefile b/Makefile
> > index b2faa9319372..66bcdbf58371 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -638,7 +638,8 @@ KBUILD_CFLAGS       += $(call cc-option,-fdata-sections,)
> >  endif
> >
> >  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
> > -KBUILD_CFLAGS  += -Os $(call cc-disable-warning,maybe-uninitialized,)
> > +KBUILD_CFLAGS  += $(call cc-option,-Oz,-Os)
> > +KBUILD_CFLAGS  += $(call cc-disable-warning,maybe-uninitialized,)
> >  else
> >  ifdef CONFIG_PROFILE_ALL_BRANCHES
> >  KBUILD_CFLAGS  += -O2 $(call cc-disable-warning,maybe-uninitialized,)
> >
> 
> 
> 
> This is the same as the following commit in LLVMLinux
> except Author/Signed-off-by.
> 
> Who should the authorship really belong to?

(this time without html, sorry for the noise)

It should belong to Behan, I missed to add a 'From' tag, sorry about
that. Should I resend with the tag or can you fix it when applying the
patch?

Matthias

> commit 186e62808239c603bfa308d5ea994a10d67bb409
> Author: Behan Webster <behanw@converseincode.com>
> Date:   Thu Oct 16 14:28:54 2014 +0200
> 
>     LLVMLinux: use -Oz instead of -Os when using clang
> 
>     This generates smaller resulting object code when compiled with clang.
> 
>     Signed-off-by: Behan Webster <behanw@converseincode.com>
> 
> 

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

* Re: [PATCH] kbuild: use -Oz instead of -Os when using clang
  2017-03-30 16:41   ` Matthias Kaehlcke
@ 2017-03-30 17:57     ` Masahiro Yamada
  2017-04-10 18:08       ` Matthias Kaehlcke
  0 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2017-03-30 17:57 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Michal Marek, Linux Kbuild mailing list,
	Linux Kernel Mailing List, Behan Webster, Greg Hackmann,
	Grant Grundler, Michael Davidson, Peter Foley

Hi Matthias,


2017-03-31 1:41 GMT+09:00 Matthias Kaehlcke <mka@chromium.org>:
> El Fri, Mar 31, 2017 at 01:03:02AM +0900 Masahiro Yamada ha dit:
>
>> 2017-03-28 10:19 GMT+09:00 Matthias Kaehlcke <mka@chromium.org>:
>> > This generates smaller resulting object code when compiled with clang.
>> >
>> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
>> > ---
>> >  Makefile | 3 ++-
>> >  1 file changed, 2 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/Makefile b/Makefile
>> > index b2faa9319372..66bcdbf58371 100644
>> > --- a/Makefile
>> > +++ b/Makefile
>> > @@ -638,7 +638,8 @@ KBUILD_CFLAGS       += $(call cc-option,-fdata-sections,)
>> >  endif
>> >
>> >  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
>> > -KBUILD_CFLAGS  += -Os $(call cc-disable-warning,maybe-uninitialized,)
>> > +KBUILD_CFLAGS  += $(call cc-option,-Oz,-Os)
>> > +KBUILD_CFLAGS  += $(call cc-disable-warning,maybe-uninitialized,)
>> >  else
>> >  ifdef CONFIG_PROFILE_ALL_BRANCHES
>> >  KBUILD_CFLAGS  += -O2 $(call cc-disable-warning,maybe-uninitialized,)
>> >
>>
>>
>>
>> This is the same as the following commit in LLVMLinux
>> except Author/Signed-off-by.
>>
>> Who should the authorship really belong to?
>
> (this time without html, sorry for the noise)
>
> It should belong to Behan, I missed to add a 'From' tag, sorry about
> that. Should I resend with the tag or can you fix it when applying the
> patch?


No need to re-send it.  I can fixup it manually.



-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] kbuild: use -Oz instead of -Os when using clang
  2017-03-30 17:57     ` Masahiro Yamada
@ 2017-04-10 18:08       ` Matthias Kaehlcke
  2017-04-12  3:38         ` Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Matthias Kaehlcke @ 2017-04-10 18:08 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Michal Marek, Linux Kbuild mailing list,
	Linux Kernel Mailing List, Behan Webster, Greg Hackmann,
	Grant Grundler, Michael Davidson, Peter Foley

Hi Masahiro,

El Fri, Mar 31, 2017 at 02:57:43AM +0900 Masahiro Yamada ha dit:

> 2017-03-31 1:41 GMT+09:00 Matthias Kaehlcke <mka@chromium.org>:
> > El Fri, Mar 31, 2017 at 01:03:02AM +0900 Masahiro Yamada ha dit:
> >
> >> 2017-03-28 10:19 GMT+09:00 Matthias Kaehlcke <mka@chromium.org>:
> >> > This generates smaller resulting object code when compiled with clang.
> >> >
> >> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> >> > ---
> >> >  Makefile | 3 ++-
> >> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >> >
> >> > diff --git a/Makefile b/Makefile
> >> > index b2faa9319372..66bcdbf58371 100644
> >> > --- a/Makefile
> >> > +++ b/Makefile
> >> > @@ -638,7 +638,8 @@ KBUILD_CFLAGS       += $(call cc-option,-fdata-sections,)
> >> >  endif
> >> >
> >> >  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
> >> > -KBUILD_CFLAGS  += -Os $(call cc-disable-warning,maybe-uninitialized,)
> >> > +KBUILD_CFLAGS  += $(call cc-option,-Oz,-Os)
> >> > +KBUILD_CFLAGS  += $(call cc-disable-warning,maybe-uninitialized,)
> >> >  else
> >> >  ifdef CONFIG_PROFILE_ALL_BRANCHES
> >> >  KBUILD_CFLAGS  += -O2 $(call cc-disable-warning,maybe-uninitialized,)
> >> >
> >>
> >>
> >>
> >> This is the same as the following commit in LLVMLinux
> >> except Author/Signed-off-by.
> >>
> >> Who should the authorship really belong to?
> >
> > (this time without html, sorry for the noise)
> >
> > It should belong to Behan, I missed to add a 'From' tag, sorry about
> > that. Should I resend with the tag or can you fix it when applying the
> > patch?
> 
> 
> No need to re-send it.  I can fixup it manually.

I couldn't locate this patch in your tree, has it been picked up?

Thanks

Matthias

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

* Re: [PATCH] kbuild: use -Oz instead of -Os when using clang
  2017-04-10 18:08       ` Matthias Kaehlcke
@ 2017-04-12  3:38         ` Masahiro Yamada
  2017-04-12 20:39           ` Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2017-04-12  3:38 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Michal Marek, Linux Kbuild mailing list,
	Linux Kernel Mailing List, Behan Webster, Greg Hackmann,
	Grant Grundler, Michael Davidson, Peter Foley

Hi Matthias,


2017-04-11 3:08 GMT+09:00 Matthias Kaehlcke <mka@chromium.org>:
> Hi Masahiro,
>
> El Fri, Mar 31, 2017 at 02:57:43AM +0900 Masahiro Yamada ha dit:
>
>> 2017-03-31 1:41 GMT+09:00 Matthias Kaehlcke <mka@chromium.org>:
>> > El Fri, Mar 31, 2017 at 01:03:02AM +0900 Masahiro Yamada ha dit:
>> >
>> >> 2017-03-28 10:19 GMT+09:00 Matthias Kaehlcke <mka@chromium.org>:
>> >> > This generates smaller resulting object code when compiled with clang.
>> >> >
>> >> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
>> >> > ---
>> >> >  Makefile | 3 ++-
>> >> >  1 file changed, 2 insertions(+), 1 deletion(-)
>> >> >
>> >> > diff --git a/Makefile b/Makefile
>> >> > index b2faa9319372..66bcdbf58371 100644
>> >> > --- a/Makefile
>> >> > +++ b/Makefile
>> >> > @@ -638,7 +638,8 @@ KBUILD_CFLAGS       += $(call cc-option,-fdata-sections,)
>> >> >  endif
>> >> >
>> >> >  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
>> >> > -KBUILD_CFLAGS  += -Os $(call cc-disable-warning,maybe-uninitialized,)
>> >> > +KBUILD_CFLAGS  += $(call cc-option,-Oz,-Os)
>> >> > +KBUILD_CFLAGS  += $(call cc-disable-warning,maybe-uninitialized,)
>> >> >  else
>> >> >  ifdef CONFIG_PROFILE_ALL_BRANCHES
>> >> >  KBUILD_CFLAGS  += -O2 $(call cc-disable-warning,maybe-uninitialized,)
>> >> >
>> >>
>> >>
>> >>
>> >> This is the same as the following commit in LLVMLinux
>> >> except Author/Signed-off-by.
>> >>
>> >> Who should the authorship really belong to?
>> >
>> > (this time without html, sorry for the noise)
>> >
>> > It should belong to Behan, I missed to add a 'From' tag, sorry about
>> > that. Should I resend with the tag or can you fix it when applying the
>> > patch?
>>
>>
>> No need to re-send it.  I can fixup it manually.
>
> I couldn't locate this patch in your tree, has it been picked up?
>


I will pick this up shortly.  Sorry for the delay.



-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] kbuild: use -Oz instead of -Os when using clang
  2017-04-12  3:38         ` Masahiro Yamada
@ 2017-04-12 20:39           ` Masahiro Yamada
  0 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2017-04-12 20:39 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Michal Marek, Linux Kbuild mailing list,
	Linux Kernel Mailing List, Behan Webster, Greg Hackmann,
	Grant Grundler, Michael Davidson, Peter Foley

2017-04-12 12:38 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> Hi Matthias,
>
>
> 2017-04-11 3:08 GMT+09:00 Matthias Kaehlcke <mka@chromium.org>:
>> Hi Masahiro,
>>
>> El Fri, Mar 31, 2017 at 02:57:43AM +0900 Masahiro Yamada ha dit:
>>
>>> 2017-03-31 1:41 GMT+09:00 Matthias Kaehlcke <mka@chromium.org>:
>>> > El Fri, Mar 31, 2017 at 01:03:02AM +0900 Masahiro Yamada ha dit:
>>> >
>>> >> 2017-03-28 10:19 GMT+09:00 Matthias Kaehlcke <mka@chromium.org>:
>>> >> > This generates smaller resulting object code when compiled with clang.
>>> >> >
>>> >> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
>>> >> > ---
>>> >> >  Makefile | 3 ++-
>>> >> >  1 file changed, 2 insertions(+), 1 deletion(-)
>>> >> >
>>> >> > diff --git a/Makefile b/Makefile
>>> >> > index b2faa9319372..66bcdbf58371 100644
>>> >> > --- a/Makefile
>>> >> > +++ b/Makefile
>>> >> > @@ -638,7 +638,8 @@ KBUILD_CFLAGS       += $(call cc-option,-fdata-sections,)
>>> >> >  endif
>>> >> >
>>> >> >  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
>>> >> > -KBUILD_CFLAGS  += -Os $(call cc-disable-warning,maybe-uninitialized,)
>>> >> > +KBUILD_CFLAGS  += $(call cc-option,-Oz,-Os)
>>> >> > +KBUILD_CFLAGS  += $(call cc-disable-warning,maybe-uninitialized,)
>>> >> >  else
>>> >> >  ifdef CONFIG_PROFILE_ALL_BRANCHES
>>> >> >  KBUILD_CFLAGS  += -O2 $(call cc-disable-warning,maybe-uninitialized,)
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >> This is the same as the following commit in LLVMLinux
>>> >> except Author/Signed-off-by.
>>> >>
>>> >> Who should the authorship really belong to?
>>> >
>>> > (this time without html, sorry for the noise)
>>> >
>>> > It should belong to Behan, I missed to add a 'From' tag, sorry about
>>> > that. Should I resend with the tag or can you fix it when applying the
>>> > patch?
>>>
>>>
>>> No need to re-send it.  I can fixup it manually.
>>
>> I couldn't locate this patch in your tree, has it been picked up?
>>
>
>
> I will pick this up shortly.  Sorry for the delay.
>


Applied to linux-kbuild/kbuild.  Thanks!



-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2017-04-12 20:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28  1:19 [PATCH] kbuild: use -Oz instead of -Os when using clang Matthias Kaehlcke
2017-03-30 16:03 ` Masahiro Yamada
2017-03-30 16:41   ` Matthias Kaehlcke
2017-03-30 17:57     ` Masahiro Yamada
2017-04-10 18:08       ` Matthias Kaehlcke
2017-04-12  3:38         ` Masahiro Yamada
2017-04-12 20:39           ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).