Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] meson: Use AR via wrapper
@ 2018-10-09 19:24 Alexey Brodkin
  2018-10-09 20:34 ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Brodkin @ 2018-10-09 19:24 UTC (permalink / raw)
  To: buildroot

If building with LTO enabled we need to use GCC wrapper for AR otherwise
archives get created improperly and we see a lot of unresolved symbols
on finla linkage.

In particular this allows to build SystemD with LTO.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Mark Corbin <mark.corbin@embecosm.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Peter Seiderer <ps.report@gmx.net>
---
 package/meson/cross-compilation.conf.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/meson/cross-compilation.conf.in b/package/meson/cross-compilation.conf.in
index 0eec74087b..de4600cc58 100644
--- a/package/meson/cross-compilation.conf.in
+++ b/package/meson/cross-compilation.conf.in
@@ -6,7 +6,7 @@
 [binaries]
 c = '@TARGET_CROSS at gcc'
 cpp = '@TARGET_CROSS at g++'
-ar = '@TARGET_CROSS at ar'
+ar = '@TARGET_CROSS at gcc-ar'
 strip = '@TARGET_CROSS at strip'
 pkgconfig = '@HOST_DIR@/usr/bin/pkg-config'
 
-- 
2.16.2

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

* [Buildroot] [PATCH] meson: Use AR via wrapper
  2018-10-09 19:24 [Buildroot] [PATCH] meson: Use AR via wrapper Alexey Brodkin
@ 2018-10-09 20:34 ` Yann E. MORIN
  2018-10-09 21:13   ` Peter Seiderer
  2018-10-10  6:43   ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Yann E. MORIN @ 2018-10-09 20:34 UTC (permalink / raw)
  To: buildroot

Alexey, All,

On 2018-10-09 22:24 +0300, Alexey Brodkin spake thusly:
> If building with LTO enabled we need to use GCC wrapper for AR otherwise
> archives get created improperly and we see a lot of unresolved symbols
> on finla linkage.
> 
> In particular this allows to build SystemD with LTO.

This is just 'systemd', not SystemD, or any other case-mangling on it
https://www.freedesktop.org/wiki/Software/systemd/ ;-)

There, I'm done with the nit-picking. ;-) Now read on, for the real
review lies below...

> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> Cc: Mark Corbin <mark.corbin@embecosm.com>
> Cc: Peter Korsgaard <peter@korsgaard.com>
> Cc: Peter Seiderer <ps.report@gmx.net>
> ---
>  package/meson/cross-compilation.conf.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/meson/cross-compilation.conf.in b/package/meson/cross-compilation.conf.in
> index 0eec74087b..de4600cc58 100644
> --- a/package/meson/cross-compilation.conf.in
> +++ b/package/meson/cross-compilation.conf.in
> @@ -6,7 +6,7 @@
>  [binaries]
>  c = '@TARGET_CROSS at gcc'
>  cpp = '@TARGET_CROSS at g++'
> -ar = '@TARGET_CROSS at ar'
> +ar = '@TARGET_CROSS at gcc-ar'

I was curioous as to see for how long gcc provided that wrapper. It
turns out that at least 4.9 did.

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

>  strip = '@TARGET_CROSS at strip'
>  pkgconfig = '@HOST_DIR@/usr/bin/pkg-config'
>  
> -- 
> 2.16.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH] meson: Use AR via wrapper
  2018-10-09 20:34 ` Yann E. MORIN
@ 2018-10-09 21:13   ` Peter Seiderer
  2018-10-10  6:43   ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Seiderer @ 2018-10-09 21:13 UTC (permalink / raw)
  To: buildroot

Hello Alexey,

On Tue, 9 Oct 2018 22:34:06 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> Alexey, All,
> 
> On 2018-10-09 22:24 +0300, Alexey Brodkin spake thusly:
> > If building with LTO enabled we need to use GCC wrapper for AR otherwise
> > archives get created improperly and we see a lot of unresolved symbols
> > on finla linkage.

From quick review another minor nit: s/finla/final/

Will try to test the patch the next days...

Regards,
Peter

> > 
> > In particular this allows to build SystemD with LTO.
> 
> This is just 'systemd', not SystemD, or any other case-mangling on it
> https://www.freedesktop.org/wiki/Software/systemd/ ;-)
> 
> There, I'm done with the nit-picking. ;-) Now read on, for the real
> review lies below...
> 
> > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> > Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> > Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> > Cc: Mark Corbin <mark.corbin@embecosm.com>
> > Cc: Peter Korsgaard <peter@korsgaard.com>
> > Cc: Peter Seiderer <ps.report@gmx.net>
> > ---
> >  package/meson/cross-compilation.conf.in | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/package/meson/cross-compilation.conf.in b/package/meson/cross-compilation.conf.in
> > index 0eec74087b..de4600cc58 100644
> > --- a/package/meson/cross-compilation.conf.in
> > +++ b/package/meson/cross-compilation.conf.in
> > @@ -6,7 +6,7 @@
> >  [binaries]
> >  c = '@TARGET_CROSS at gcc'
> >  cpp = '@TARGET_CROSS at g++'
> > -ar = '@TARGET_CROSS at ar'
> > +ar = '@TARGET_CROSS at gcc-ar'
> 
> I was curioous as to see for how long gcc provided that wrapper. It
> turns out that at least 4.9 did.
> 
> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> Regards,
> Yann E. MORIN.
> 
> >  strip = '@TARGET_CROSS at strip'
> >  pkgconfig = '@HOST_DIR@/usr/bin/pkg-config'
> >  
> > -- 
> > 2.16.2
> > 
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
> 

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

* [Buildroot] [PATCH] meson: Use AR via wrapper
  2018-10-09 20:34 ` Yann E. MORIN
  2018-10-09 21:13   ` Peter Seiderer
@ 2018-10-10  6:43   ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2018-10-10  6:43 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 9 Oct 2018 22:34:06 +0200, Yann E. MORIN wrote:
> > -ar = '@TARGET_CROSS at ar'
> > +ar = '@TARGET_CROSS at gcc-ar'  
> 
> I was curioous as to see for how long gcc provided that wrapper. It
> turns out that at least 4.9 did.

Actually, we support external toolchains older than gcc 4.9. So no, it
is not good to use gcc-ar unconditionally.

So, it's like I replied on the LTO-enabling patch for systemd, we need
a global Config.in option that tells us if the toolchain supports LTO
or not, and another if the user wants to use LTO.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2018-10-10  6:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-09 19:24 [Buildroot] [PATCH] meson: Use AR via wrapper Alexey Brodkin
2018-10-09 20:34 ` Yann E. MORIN
2018-10-09 21:13   ` Peter Seiderer
2018-10-10  6:43   ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox