* [Buildroot] [PATCH] uclibc: respect top-level TARGET_CFLAGS
@ 2014-11-06 11:47 Alexey Brodkin
2014-11-06 11:51 ` Baruch Siach
2014-11-06 12:49 ` Gustavo Zacarias
0 siblings, 2 replies; 9+ messages in thread
From: Alexey Brodkin @ 2014-11-06 11:47 UTC (permalink / raw)
To: buildroot
When BR2_TARGET_OPTIMIZATION is used (with some specific compiler flags)
it's expected that ALL target binaries will be built with specified options.
Currently uClibc is built with its own set of options.
This change allows passing additional flags to uclibc build system.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Anton Kolesov <akolesov@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
package/uclibc/uclibc.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index ce416dd..419a4d1 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -24,6 +24,8 @@ endif
UCLIBC_INSTALL_STAGING = YES
+UCLIBC_EXTRA_CFLAGS = $(TARGET_CFLAGS)
+
# uclibc is part of the toolchain so disable the toolchain dependency
UCLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO
--
1.9.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] uclibc: respect top-level TARGET_CFLAGS
2014-11-06 11:47 [Buildroot] [PATCH] uclibc: respect top-level TARGET_CFLAGS Alexey Brodkin
@ 2014-11-06 11:51 ` Baruch Siach
2014-11-06 11:59 ` Alexey Brodkin
2014-11-06 12:49 ` Gustavo Zacarias
1 sibling, 1 reply; 9+ messages in thread
From: Baruch Siach @ 2014-11-06 11:51 UTC (permalink / raw)
To: buildroot
Hi Alexey,
On Thu, Nov 06, 2014 at 02:47:22PM +0300, Alexey Brodkin wrote:
> When BR2_TARGET_OPTIMIZATION is used (with some specific compiler flags)
> it's expected that ALL target binaries will be built with specified options.
>
> Currently uClibc is built with its own set of options.
> This change allows passing additional flags to uclibc build system.
>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
>
> Cc: Anton Kolesov <akolesov@synopsys.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Peter Korsgaard <peter@korsgaard.com>
> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
> Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Have you actually CCed all these addresses? I only see Thomas in the Cc:
header, besides you.
baruch
> ---
> package/uclibc/uclibc.mk | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
> index ce416dd..419a4d1 100644
> --- a/package/uclibc/uclibc.mk
> +++ b/package/uclibc/uclibc.mk
> @@ -24,6 +24,8 @@ endif
>
> UCLIBC_INSTALL_STAGING = YES
>
> +UCLIBC_EXTRA_CFLAGS = $(TARGET_CFLAGS)
> +
> # uclibc is part of the toolchain so disable the toolchain dependency
> UCLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] uclibc: respect top-level TARGET_CFLAGS
2014-11-06 11:51 ` Baruch Siach
@ 2014-11-06 11:59 ` Alexey Brodkin
2014-11-06 12:03 ` Baruch Siach
0 siblings, 1 reply; 9+ messages in thread
From: Alexey Brodkin @ 2014-11-06 11:59 UTC (permalink / raw)
To: buildroot
Hi Baruch,
On Thu, 2014-11-06 at 13:51 +0200, Baruch Siach wrote:
> Hi Alexey,
>
> On Thu, Nov 06, 2014 at 02:47:22PM +0300, Alexey Brodkin wrote:
> > When BR2_TARGET_OPTIMIZATION is used (with some specific compiler flags)
> > it's expected that ALL target binaries will be built with specified options.
> >
> > Currently uClibc is built with its own set of options.
> > This change allows passing additional flags to uclibc build system.
> >
> > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> >
> > Cc: Anton Kolesov <akolesov@synopsys.com>
> > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > Cc: Peter Korsgaard <peter@korsgaard.com>
> > Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
> > Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
>
> Have you actually CCed all these addresses? I only see Thomas in the Cc:
> header, besides you.
That's why I add "Cc:" in commit message.
Because "git send-email" automatically adds mentioned addresses to CC.
That's an extract of "git send-email" log:
--->---
MAIL FROM:<abrodkin@synopsys.com>
RCPT TO:<buildroot@buildroot.org>
RCPT TO:<abrodkin@synopsys.com>
RCPT TO:<akolesov@synopsys.com>
RCPT TO:<thomas.petazzoni@free-electrons.com>
RCPT TO:<peter@korsgaard.com>
RCPT TO:<gustavo@zacarias.com.ar>
RCPT TO:<Vincent.Riera@imgtec.com>
From: Alexey Brodkin <abrodkin@synopsys.com>
To: buildroot at buildroot.org
Cc: Alexey Brodkin <abrodkin@synopsys.com>,
Anton Kolesov <akolesov@synopsys.com>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Peter Korsgaard <peter@korsgaard.com>,
Gustavo Zacarias <gustavo@zacarias.com.ar>,
Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Subject: [PATCH] uclibc: respect top-level TARGET_CFLAGS
Date: Thu, 6 Nov 2014 14:47:22 +0300
Message-Id: <1415274442-24547-1-git-send-email-abrodkin@synopsys.com>
X-Mailer: git-send-email 1.9.3
--->---
-Alexey
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] uclibc: respect top-level TARGET_CFLAGS
2014-11-06 11:59 ` Alexey Brodkin
@ 2014-11-06 12:03 ` Baruch Siach
2014-11-06 17:25 ` Thomas Petazzoni
0 siblings, 1 reply; 9+ messages in thread
From: Baruch Siach @ 2014-11-06 12:03 UTC (permalink / raw)
To: buildroot
Hi Alexey,
On Thu, Nov 06, 2014 at 11:59:32AM +0000, Alexey Brodkin wrote:
> On Thu, 2014-11-06 at 13:51 +0200, Baruch Siach wrote:
> > On Thu, Nov 06, 2014 at 02:47:22PM +0300, Alexey Brodkin wrote:
> > > When BR2_TARGET_OPTIMIZATION is used (with some specific compiler flags)
> > > it's expected that ALL target binaries will be built with specified options.
> > >
> > > Currently uClibc is built with its own set of options.
> > > This change allows passing additional flags to uclibc build system.
> > >
> > > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> > >
> > > Cc: Anton Kolesov <akolesov@synopsys.com>
> > > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > > Cc: Peter Korsgaard <peter@korsgaard.com>
> > > Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
> > > Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> >
> > Have you actually CCed all these addresses? I only see Thomas in the Cc:
> > header, besides you.
>
> That's why I add "Cc:" in commit message.
> Because "git send-email" automatically adds mentioned addresses to CC.
OK then. It seems that the list handler striped the addresses of list
subscribers from the Cc header except that of Thomas.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] uclibc: respect top-level TARGET_CFLAGS
2014-11-06 11:47 [Buildroot] [PATCH] uclibc: respect top-level TARGET_CFLAGS Alexey Brodkin
2014-11-06 11:51 ` Baruch Siach
@ 2014-11-06 12:49 ` Gustavo Zacarias
2014-11-06 13:04 ` Alexey Brodkin
1 sibling, 1 reply; 9+ messages in thread
From: Gustavo Zacarias @ 2014-11-06 12:49 UTC (permalink / raw)
To: buildroot
On 11/06/2014 08:47 AM, Alexey Brodkin wrote:
> When BR2_TARGET_OPTIMIZATION is used (with some specific compiler flags)
> it's expected that ALL target binaries will be built with specified options.
>
> Currently uClibc is built with its own set of options.
> This change allows passing additional flags to uclibc build system.
>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
This was rejected before:
https://bugs.busybox.net/show_bug.cgi?id=5294
And i'm back to my original question, what's the specific need for this?
Even for eglibc/glibc we force -O2 for example.
If there's a very valid (like, it breaks!) reason for this we can look
for a way to address it, but as-is i say NAK.
If you look at uClibc's Rules.mak file you'll see there are lots of
OPTIMIZATION/CPU_CFLAGS (and other) conditionals that could be undone by
this and lead to unexpected results.
Regards.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] uclibc: respect top-level TARGET_CFLAGS
2014-11-06 12:49 ` Gustavo Zacarias
@ 2014-11-06 13:04 ` Alexey Brodkin
2014-11-06 13:18 ` Gustavo Zacarias
0 siblings, 1 reply; 9+ messages in thread
From: Alexey Brodkin @ 2014-11-06 13:04 UTC (permalink / raw)
To: buildroot
Hi Gustavo,
On Thu, 2014-11-06 at 09:49 -0300, Gustavo Zacarias wrote:
> On 11/06/2014 08:47 AM, Alexey Brodkin wrote:
>
> > When BR2_TARGET_OPTIMIZATION is used (with some specific compiler flags)
> > it's expected that ALL target binaries will be built with specified options.
> >
> > Currently uClibc is built with its own set of options.
> > This change allows passing additional flags to uclibc build system.
> >
> > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
>
> This was rejected before:
> https://bugs.busybox.net/show_bug.cgi?id=5294
>
> And i'm back to my original question, what's the specific need for this?
> Even for eglibc/glibc we force -O2 for example.
> If there's a very valid (like, it breaks!) reason for this we can look
> for a way to address it, but as-is i say NAK.
> If you look at uClibc's Rules.mak file you'll see there are lots of
> OPTIMIZATION/CPU_CFLAGS (and other) conditionals that could be undone by
> this and lead to unexpected results.
> Regards.
>
Thanks for pointing to the existing bug.
In my particular case I need to tune uClibc for different HW
configurations.
By default uClibc will be built for most conservative case.
But we have an ability to use a particular HW accelerators - which is
done by passing option to GCC.
-Alexey
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] uclibc: respect top-level TARGET_CFLAGS
2014-11-06 13:04 ` Alexey Brodkin
@ 2014-11-06 13:18 ` Gustavo Zacarias
2014-11-11 15:32 ` Alexey Brodkin
0 siblings, 1 reply; 9+ messages in thread
From: Gustavo Zacarias @ 2014-11-06 13:18 UTC (permalink / raw)
To: buildroot
On 11/06/2014 10:04 AM, Alexey Brodkin wrote:
> Thanks for pointing to the existing bug.
>
> In my particular case I need to tune uClibc for different HW
> configurations.
>
> By default uClibc will be built for most conservative case.
> But we have an ability to use a particular HW accelerators - which is
> done by passing option to GCC.
Then we could add a BR2_UCLIBC_EXTRA_CFLAGS string which defaults to ""
and pass that to the uclibc's UCLIBC_EXTRA_CFLAGS.
It was mentioned in the past IIRC, however it wasn't done because
probably nobody felt the need for it since everybody was asking for that
for consistency alone.
Regards.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] uclibc: respect top-level TARGET_CFLAGS
2014-11-06 12:03 ` Baruch Siach
@ 2014-11-06 17:25 ` Thomas Petazzoni
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2014-11-06 17:25 UTC (permalink / raw)
To: buildroot
Dear Baruch Siach,
On Thu, 6 Nov 2014 14:03:25 +0200, Baruch Siach wrote:
> > That's why I add "Cc:" in commit message.
> > Because "git send-email" automatically adds mentioned addresses to CC.
>
> OK then. It seems that the list handler striped the addresses of list
> subscribers from the Cc header except that of Thomas.
Yes, the list handler does some horrible crap with Cc, it seems to
strip some of them when the recipient is subscribed to the list, but
not all of them.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] uclibc: respect top-level TARGET_CFLAGS
2014-11-06 13:18 ` Gustavo Zacarias
@ 2014-11-11 15:32 ` Alexey Brodkin
0 siblings, 0 replies; 9+ messages in thread
From: Alexey Brodkin @ 2014-11-11 15:32 UTC (permalink / raw)
To: buildroot
Hi Gustavo,
On Thu, 2014-11-06 at 10:18 -0300, Gustavo Zacarias wrote:
> On 11/06/2014 10:04 AM, Alexey Brodkin wrote:
>
> > Thanks for pointing to the existing bug.
> >
> > In my particular case I need to tune uClibc for different HW
> > configurations.
> >
> > By default uClibc will be built for most conservative case.
> > But we have an ability to use a particular HW accelerators - which is
> > done by passing option to GCC.
>
> Then we could add a BR2_UCLIBC_EXTRA_CFLAGS string which defaults to ""
> and pass that to the uclibc's UCLIBC_EXTRA_CFLAGS.
> It was mentioned in the past IIRC, however it wasn't done because
> probably nobody felt the need for it since everybody was asking for that
> for consistency alone.
> Regards.
Makes sense. And I think I'll do a re-spin of my patch that implements
your suggestion.
Even though my intention was to completely align uClibc's flags with all
other binaries on target, probably it's enough to have this proposed
possibility to add manually set op option to uClibc in particular.
Still I think if any package gets broken due to some combination of
compiler options passed this is definitely a problem in either package
itself or toolchain. And either variant should be investigated and
properly fixed. Otherwise we introduce "robustness and predictability by
fixed setup" :)
-Alexey
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-11-11 15:32 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-06 11:47 [Buildroot] [PATCH] uclibc: respect top-level TARGET_CFLAGS Alexey Brodkin
2014-11-06 11:51 ` Baruch Siach
2014-11-06 11:59 ` Alexey Brodkin
2014-11-06 12:03 ` Baruch Siach
2014-11-06 17:25 ` Thomas Petazzoni
2014-11-06 12:49 ` Gustavo Zacarias
2014-11-06 13:04 ` Alexey Brodkin
2014-11-06 13:18 ` Gustavo Zacarias
2014-11-11 15:32 ` Alexey Brodkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox