All of lore.kernel.org
 help / color / mirror / Atom feed
* flto automake
@ 2018-12-18 18:08 James Feist
  2018-12-19  0:33 ` Brad Bishop
  0 siblings, 1 reply; 23+ messages in thread
From: James Feist @ 2018-12-18 18:08 UTC (permalink / raw)
  To: OpenBMC Maillist

If you aren't planning on enabling flto in a repo you can ignore this email.


I've created a new class flto-automake 
https://github.com/openbmc/meta-phosphor/blob/master/classes/flto-automake.bbclass 
if you are enabling -flto in an autotools project you might be 
interested in. When using static libraries you may run into undefined 
references when building with Yocto. Yocto by default uses:

export AR = "${HOST_PREFIX}ar"
export RANLIB = "${HOST_PREFIX}ranlib"

for AR and RANLIB. This new class replaces these with the gcc equivalent 
wrappers that can work with the flto object files. This doesn't seem to 
be an issue for the CI build, it only shows up for Yocto builds. 
Reference: 
http://stackoverflow.com/questions/25878407/how-can-i-use-lto-with-static-libraries#comment67660913_25878408

For Cmake I suggest looking at the way bmcweb handles it in CMakesLists:
https://github.com/openbmc/bmcweb/blob/master/CMakeLists.txt#L92

Thanks,

James

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

* Re: flto automake
  2018-12-18 18:08 flto automake James Feist
@ 2018-12-19  0:33 ` Brad Bishop
  2018-12-19  1:07     ` Burton, Ross
  2018-12-20  1:16     ` Khem Raj
  0 siblings, 2 replies; 23+ messages in thread
From: Brad Bishop @ 2018-12-19  0:33 UTC (permalink / raw)
  To: James Feist; +Cc: OpenBMC Maillist, openembedded-core



> On Dec 18, 2018, at 1:08 PM, James Feist <james.feist@linux.intel.com> wrote:
> 
> If you aren't planning on enabling flto in a repo you can ignore this email.
> 
> 
> I've created a new class flto-automake https://github.com/openbmc/meta-phosphor/blob/master/classes/flto-automake.bbclass if you are enabling -flto in an autotools project you might be interested in. When using static libraries you may run into undefined references when building with Yocto. Yocto by default uses:
> 
> export AR = "${HOST_PREFIX}ar"
> export RANLIB = "${HOST_PREFIX}ranlib"
> 
> for AR and RANLIB. This new class replaces these with the gcc equivalent wrappers that can work with the flto object files. This doesn't seem to be an issue for the CI build, it only shows up for Yocto builds. Reference: http://stackoverflow.com/questions/25878407/how-can-i-use-lto-with-static-libraries#comment67660913_25878408
> 
> For Cmake I suggest looking at the way bmcweb handles it in CMakesLists:
> https://github.com/openbmc/bmcweb/blob/master/CMakeLists.txt#L92
> 
> Thanks,
> 
> James

Thanks James

I wonder if this is something they would be interested in upstream.  I’ve copied
the oe-core mailing list for possible comment.

-brad

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

* Re: [OE-core] flto automake
  2018-12-19  0:33 ` Brad Bishop
@ 2018-12-19  1:07     ` Burton, Ross
  2018-12-20  1:16     ` Khem Raj
  1 sibling, 0 replies; 23+ messages in thread
From: Burton, Ross @ 2018-12-19  1:07 UTC (permalink / raw)
  To: Bradley Bishop; +Cc: james.feist, OpenBMC, OE-core

On Wed, 19 Dec 2018 at 00:42, Brad Bishop <bradleyb@fuzziesquirrel.com> wrote:

> I wonder if this is something they would be interested in upstream.  I’ve copied
> the oe-core mailing list for possible comment.

Thanks for forwarding this to us.  The class is very simple and just does:

PACKAGECONFIG_CONFARGS += " AR=${TARGET_PREFIX}gcc-ar \
RANLIB=${TARGET_PREFIX}gcc-ranlib"

That's quite an abuse of PACKAGECONFIG_CONFARGS, I'd recommend just
setting AR and RANLIB directly in the class, they'll override the
defaults in bitbake.conf.

That however leads to the question of should we just change the
defaults? Does anything break if we use gcc-ar instead of ar?

Ross

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

* Re: flto automake
@ 2018-12-19  1:07     ` Burton, Ross
  0 siblings, 0 replies; 23+ messages in thread
From: Burton, Ross @ 2018-12-19  1:07 UTC (permalink / raw)
  To: Bradley Bishop; +Cc: OpenBMC, james.feist, OE-core

On Wed, 19 Dec 2018 at 00:42, Brad Bishop <bradleyb@fuzziesquirrel.com> wrote:

> I wonder if this is something they would be interested in upstream.  I’ve copied
> the oe-core mailing list for possible comment.

Thanks for forwarding this to us.  The class is very simple and just does:

PACKAGECONFIG_CONFARGS += " AR=${TARGET_PREFIX}gcc-ar \
RANLIB=${TARGET_PREFIX}gcc-ranlib"

That's quite an abuse of PACKAGECONFIG_CONFARGS, I'd recommend just
setting AR and RANLIB directly in the class, they'll override the
defaults in bitbake.conf.

That however leads to the question of should we just change the
defaults? Does anything break if we use gcc-ar instead of ar?

Ross


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

* Re: [OE-core] flto automake
  2018-12-19  1:07     ` Burton, Ross
  (?)
@ 2018-12-19  1:58     ` Lei YU
  -1 siblings, 0 replies; 23+ messages in thread
From: Lei YU @ 2018-12-19  1:58 UTC (permalink / raw)
  To: ross.burton; +Cc: Brad Bishop, OpenBMC Maillist, james.feist, openembedded-core

On Wed, Dec 19, 2018 at 9:07 AM Burton, Ross <ross.burton@intel.com> wrote:
>
> On Wed, 19 Dec 2018 at 00:42, Brad Bishop <bradleyb@fuzziesquirrel.com> wrote:
>
> > I wonder if this is something they would be interested in upstream.  I’ve copied
> > the oe-core mailing list for possible comment.
>
> Thanks for forwarding this to us.  The class is very simple and just does:
>
> PACKAGECONFIG_CONFARGS += " AR=${TARGET_PREFIX}gcc-ar \
> RANLIB=${TARGET_PREFIX}gcc-ranlib"

Oh I like it in a common class! We have "ugly" AC_SUBST for AR and RANLIB to
gcc one in https://github.com/openbmc/phosphor-time-manager/blob/master/configure.ac#L10-L11
Let's see how upstream think about this.

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

* Re: [OE-core] flto automake
  2018-12-19  1:07     ` Burton, Ross
@ 2018-12-19 10:00       ` Burton, Ross
  -1 siblings, 0 replies; 23+ messages in thread
From: Burton, Ross @ 2018-12-19 10:00 UTC (permalink / raw)
  To: Bradley Bishop; +Cc: james.feist, OpenBMC, OE-core

On Wed, 19 Dec 2018 at 01:07, Burton, Ross <ross.burton@intel.com> wrote:

> That however leads to the question of should we just change the
> defaults? Does anything break if we use gcc-ar instead of ar?

Answer: yes.

| x86_64-poky-linux-gcc-ar  rc libgcov.a $objects
| x86_64-poky-linux-gcc-ar: Cannot find plugin 'liblto_plugin.so'
| Makefile:932: recipe for target 'libgcov.a' failed
ERROR: Task (/home/ross/Yocto/poky/meta/recipes-devtools/gcc/libgcc-initial_8.2.bb:do_compile)
failed with exit code '1'

I don't know enough about gcc...

Ross

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

* Re: flto automake
@ 2018-12-19 10:00       ` Burton, Ross
  0 siblings, 0 replies; 23+ messages in thread
From: Burton, Ross @ 2018-12-19 10:00 UTC (permalink / raw)
  To: Bradley Bishop; +Cc: OpenBMC, james.feist, OE-core

On Wed, 19 Dec 2018 at 01:07, Burton, Ross <ross.burton@intel.com> wrote:

> That however leads to the question of should we just change the
> defaults? Does anything break if we use gcc-ar instead of ar?

Answer: yes.

| x86_64-poky-linux-gcc-ar  rc libgcov.a $objects
| x86_64-poky-linux-gcc-ar: Cannot find plugin 'liblto_plugin.so'
| Makefile:932: recipe for target 'libgcov.a' failed
ERROR: Task (/home/ross/Yocto/poky/meta/recipes-devtools/gcc/libgcc-initial_8.2.bb:do_compile)
failed with exit code '1'

I don't know enough about gcc...

Ross


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

* Re: [OE-core] flto automake
  2018-12-19 10:00       ` Burton, Ross
@ 2018-12-19 10:43         ` Richard Purdie
  -1 siblings, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2018-12-19 10:43 UTC (permalink / raw)
  To: Burton, Ross, Bradley Bishop; +Cc: OpenBMC, james.feist, OE-core

On Wed, 2018-12-19 at 10:00 +0000, Burton, Ross wrote:
> On Wed, 19 Dec 2018 at 01:07, Burton, Ross <ross.burton@intel.com>
> wrote:
> 
> > That however leads to the question of should we just change the
> > defaults? Does anything break if we use gcc-ar instead of ar?
> 
> Answer: yes.
> 
> > x86_64-poky-linux-gcc-ar  rc libgcov.a $objects
> > x86_64-poky-linux-gcc-ar: Cannot find plugin 'liblto_plugin.so'
> > Makefile:932: recipe for target 'libgcov.a' failed
> ERROR: Task (/home/ross/Yocto/poky/meta/recipes-devtools/gcc/libgcc-
> initial_8.2.bb:do_compile)
> failed with exit code '1'
> 
> I don't know enough about gcc...

The -initial compiler doesn't have lto compiled into it so you probably
need to use binutils ar for that part of the bootstrap.

Cheers,

Richard

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

* Re: flto automake
@ 2018-12-19 10:43         ` Richard Purdie
  0 siblings, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2018-12-19 10:43 UTC (permalink / raw)
  To: Burton, Ross, Bradley Bishop; +Cc: OpenBMC, james.feist, OE-core

On Wed, 2018-12-19 at 10:00 +0000, Burton, Ross wrote:
> On Wed, 19 Dec 2018 at 01:07, Burton, Ross <ross.burton@intel.com>
> wrote:
> 
> > That however leads to the question of should we just change the
> > defaults? Does anything break if we use gcc-ar instead of ar?
> 
> Answer: yes.
> 
> > x86_64-poky-linux-gcc-ar  rc libgcov.a $objects
> > x86_64-poky-linux-gcc-ar: Cannot find plugin 'liblto_plugin.so'
> > Makefile:932: recipe for target 'libgcov.a' failed
> ERROR: Task (/home/ross/Yocto/poky/meta/recipes-devtools/gcc/libgcc-
> initial_8.2.bb:do_compile)
> failed with exit code '1'
> 
> I don't know enough about gcc...

The -initial compiler doesn't have lto compiled into it so you probably
need to use binutils ar for that part of the bootstrap.

Cheers,

Richard



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

* Re: [OE-core] flto automake
  2018-12-19  0:33 ` Brad Bishop
@ 2018-12-20  1:16     ` Khem Raj
  2018-12-20  1:16     ` Khem Raj
  1 sibling, 0 replies; 23+ messages in thread
From: Khem Raj @ 2018-12-20  1:16 UTC (permalink / raw)
  To: Brad Bishop
  Cc: James Feist, OpenBMC Maillist,
	Patches and discussions about the oe-core layer

On Tue, Dec 18, 2018 at 4:42 PM Brad Bishop <bradleyb@fuzziesquirrel.com> wrote:
>
>
>
> > On Dec 18, 2018, at 1:08 PM, James Feist <james.feist@linux.intel.com> wrote:
> >
> > If you aren't planning on enabling flto in a repo you can ignore this email.
> >
> >
> > I've created a new class flto-automake https://github.com/openbmc/meta-phosphor/blob/master/classes/flto-automake.bbclass if you are enabling -flto in an autotools project you might be interested in. When using static libraries you may run into undefined references when building with Yocto. Yocto by default uses:


The changes are right but I think flto should also be a DISTRO_FEATURE
and this change should become effective only when flto is in
DISTRO_FEATURES

> >
> > export AR = "${HOST_PREFIX}ar"
> > export RANLIB = "${HOST_PREFIX}ranlib"
> >
> > for AR and RANLIB. This new class replaces these with the gcc equivalent wrappers that can work with the flto object files. This doesn't seem to be an issue for the CI build, it only shows up for Yocto builds. Reference: http://stackoverflow.com/questions/25878407/how-can-i-use-lto-with-static-libraries#comment67660913_25878408
> >
> > For Cmake I suggest looking at the way bmcweb handles it in CMakesLists:
> > https://github.com/openbmc/bmcweb/blob/master/CMakeLists.txt#L92

hardcoding is not right. We have cross versions of these tools
installed during OE build and we also have options to use non-gcc
compilers, e.g. llvm provides its own verisons of llvm-ar and
llvm-ranlib and llvm-nm which should be used when using clang
or other llvm based static compilers.
This is right fix for cross compiling with CMake
https://github.com/YoeDistro/meta-ti/blob/yoe/mut/recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch

> >
> > Thanks,
> >
> > James
>
> Thanks James
>
> I wonder if this is something they would be interested in upstream.  I’ve copied
> the oe-core mailing list for possible comment.
>
> -brad
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

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

* Re: flto automake
@ 2018-12-20  1:16     ` Khem Raj
  0 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2018-12-20  1:16 UTC (permalink / raw)
  To: Brad Bishop
  Cc: OpenBMC Maillist, James Feist,
	Patches and discussions about the oe-core layer

On Tue, Dec 18, 2018 at 4:42 PM Brad Bishop <bradleyb@fuzziesquirrel.com> wrote:
>
>
>
> > On Dec 18, 2018, at 1:08 PM, James Feist <james.feist@linux.intel.com> wrote:
> >
> > If you aren't planning on enabling flto in a repo you can ignore this email.
> >
> >
> > I've created a new class flto-automake https://github.com/openbmc/meta-phosphor/blob/master/classes/flto-automake.bbclass if you are enabling -flto in an autotools project you might be interested in. When using static libraries you may run into undefined references when building with Yocto. Yocto by default uses:


The changes are right but I think flto should also be a DISTRO_FEATURE
and this change should become effective only when flto is in
DISTRO_FEATURES

> >
> > export AR = "${HOST_PREFIX}ar"
> > export RANLIB = "${HOST_PREFIX}ranlib"
> >
> > for AR and RANLIB. This new class replaces these with the gcc equivalent wrappers that can work with the flto object files. This doesn't seem to be an issue for the CI build, it only shows up for Yocto builds. Reference: http://stackoverflow.com/questions/25878407/how-can-i-use-lto-with-static-libraries#comment67660913_25878408
> >
> > For Cmake I suggest looking at the way bmcweb handles it in CMakesLists:
> > https://github.com/openbmc/bmcweb/blob/master/CMakeLists.txt#L92

hardcoding is not right. We have cross versions of these tools
installed during OE build and we also have options to use non-gcc
compilers, e.g. llvm provides its own verisons of llvm-ar and
llvm-ranlib and llvm-nm which should be used when using clang
or other llvm based static compilers.
This is right fix for cross compiling with CMake
https://github.com/YoeDistro/meta-ti/blob/yoe/mut/recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch

> >
> > Thanks,
> >
> > James
>
> Thanks James
>
> I wonder if this is something they would be interested in upstream.  I’ve copied
> the oe-core mailing list for possible comment.
>
> -brad
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [OE-core] flto automake
  2018-12-19  1:07     ` Burton, Ross
@ 2018-12-20  1:19       ` Khem Raj
  -1 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2018-12-20  1:19 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Bradley Bishop, OpenBMC, James Feist, OE-core

On Tue, Dec 18, 2018 at 5:07 PM Burton, Ross <ross.burton@intel.com> wrote:
>
> On Wed, 19 Dec 2018 at 00:42, Brad Bishop <bradleyb@fuzziesquirrel.com> wrote:
>
> > I wonder if this is something they would be interested in upstream.  I’ve copied
> > the oe-core mailing list for possible comment.
>
> Thanks for forwarding this to us.  The class is very simple and just does:
>
> PACKAGECONFIG_CONFARGS += " AR=${TARGET_PREFIX}gcc-ar \
> RANLIB=${TARGET_PREFIX}gcc-ranlib"
>
> That's quite an abuse of PACKAGECONFIG_CONFARGS, I'd recommend just
> setting AR and RANLIB directly in the class, they'll override the
> defaults in bitbake.conf.
>
> That however leads to the question of should we just change the
> defaults? Does anything break if we use gcc-ar instead of ar?

Dont think that is a good idea in general since gcc-ar is a wrapper
around normal ar
passing --plugin=/path/to/lto/plugin/so and that may not be right
thing to do always.

>
> Ross
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

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

* Re: flto automake
@ 2018-12-20  1:19       ` Khem Raj
  0 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2018-12-20  1:19 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OpenBMC, Bradley Bishop, James Feist, OE-core

On Tue, Dec 18, 2018 at 5:07 PM Burton, Ross <ross.burton@intel.com> wrote:
>
> On Wed, 19 Dec 2018 at 00:42, Brad Bishop <bradleyb@fuzziesquirrel.com> wrote:
>
> > I wonder if this is something they would be interested in upstream.  I’ve copied
> > the oe-core mailing list for possible comment.
>
> Thanks for forwarding this to us.  The class is very simple and just does:
>
> PACKAGECONFIG_CONFARGS += " AR=${TARGET_PREFIX}gcc-ar \
> RANLIB=${TARGET_PREFIX}gcc-ranlib"
>
> That's quite an abuse of PACKAGECONFIG_CONFARGS, I'd recommend just
> setting AR and RANLIB directly in the class, they'll override the
> defaults in bitbake.conf.
>
> That however leads to the question of should we just change the
> defaults? Does anything break if we use gcc-ar instead of ar?

Dont think that is a good idea in general since gcc-ar is a wrapper
around normal ar
passing --plugin=/path/to/lto/plugin/so and that may not be right
thing to do always.

>
> Ross
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [OE-core] flto automake
  2018-12-20  1:19       ` Khem Raj
@ 2018-12-20 12:37         ` Burton, Ross
  -1 siblings, 0 replies; 23+ messages in thread
From: Burton, Ross @ 2018-12-20 12:37 UTC (permalink / raw)
  To: Khem Raj; +Cc: Bradley Bishop, OpenBMC, james.feist, OE-core

On Thu, 20 Dec 2018 at 01:20, Khem Raj <raj.khem@gmail.com> wrote:
> > That however leads to the question of should we just change the
> > defaults? Does anything break if we use gcc-ar instead of ar?
>
> Dont think that is a good idea in general since gcc-ar is a wrapper
> around normal ar
> passing --plugin=/path/to/lto/plugin/so and that may not be right
> thing to do always.

Well, I built core-image-sato core-image-weston with AR=gcc-ar
RANLIB=gcc-ranlib globally and it worked fine.

As we build the cross gcc we know what is in it.  Other toolchains be
they clang, ICC, or external GCCs, can override AR just like they do
the other variables.

Ross

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

* Re: flto automake
@ 2018-12-20 12:37         ` Burton, Ross
  0 siblings, 0 replies; 23+ messages in thread
From: Burton, Ross @ 2018-12-20 12:37 UTC (permalink / raw)
  To: Khem Raj; +Cc: OpenBMC, Bradley Bishop, james.feist, OE-core

On Thu, 20 Dec 2018 at 01:20, Khem Raj <raj.khem@gmail.com> wrote:
> > That however leads to the question of should we just change the
> > defaults? Does anything break if we use gcc-ar instead of ar?
>
> Dont think that is a good idea in general since gcc-ar is a wrapper
> around normal ar
> passing --plugin=/path/to/lto/plugin/so and that may not be right
> thing to do always.

Well, I built core-image-sato core-image-weston with AR=gcc-ar
RANLIB=gcc-ranlib globally and it worked fine.

As we build the cross gcc we know what is in it.  Other toolchains be
they clang, ICC, or external GCCs, can override AR just like they do
the other variables.

Ross


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

* Re: [OE-core] flto automake
  2018-12-20 12:37         ` Burton, Ross
@ 2018-12-20 15:36           ` Khem Raj
  -1 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2018-12-20 15:36 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Bradley Bishop, OpenBMC, James Feist, OE-core

On Thu, Dec 20, 2018 at 4:37 AM Burton, Ross <ross.burton@intel.com> wrote:
>
> On Thu, 20 Dec 2018 at 01:20, Khem Raj <raj.khem@gmail.com> wrote:
> > > That however leads to the question of should we just change the
> > > defaults? Does anything break if we use gcc-ar instead of ar?
> >
> > Dont think that is a good idea in general since gcc-ar is a wrapper
> > around normal ar
> > passing --plugin=/path/to/lto/plugin/so and that may not be right
> > thing to do always.
>
> Well, I built core-image-sato core-image-weston with AR=gcc-ar
> RANLIB=gcc-ranlib globally and it worked fine.

Please build a lot more. These images cover only handful of recipes
there are problems like

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77576

which we might have to contend.

>
> As we build the cross gcc we know what is in it.  Other toolchains be
> they clang, ICC, or external GCCs, can override AR just like they do
> the other variables.
>

Yes they can, but what doe this buy us ? except we make Core toolchain
gcc dependent one step more.

> Ross

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

* Re: flto automake
@ 2018-12-20 15:36           ` Khem Raj
  0 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2018-12-20 15:36 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OpenBMC, Bradley Bishop, James Feist, OE-core

On Thu, Dec 20, 2018 at 4:37 AM Burton, Ross <ross.burton@intel.com> wrote:
>
> On Thu, 20 Dec 2018 at 01:20, Khem Raj <raj.khem@gmail.com> wrote:
> > > That however leads to the question of should we just change the
> > > defaults? Does anything break if we use gcc-ar instead of ar?
> >
> > Dont think that is a good idea in general since gcc-ar is a wrapper
> > around normal ar
> > passing --plugin=/path/to/lto/plugin/so and that may not be right
> > thing to do always.
>
> Well, I built core-image-sato core-image-weston with AR=gcc-ar
> RANLIB=gcc-ranlib globally and it worked fine.

Please build a lot more. These images cover only handful of recipes
there are problems like

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77576

which we might have to contend.

>
> As we build the cross gcc we know what is in it.  Other toolchains be
> they clang, ICC, or external GCCs, can override AR just like they do
> the other variables.
>

Yes they can, but what doe this buy us ? except we make Core toolchain
gcc dependent one step more.

> Ross


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

* Re: [OE-core] flto automake
  2018-12-20 15:36           ` Khem Raj
@ 2018-12-20 15:47             ` Burton, Ross
  -1 siblings, 0 replies; 23+ messages in thread
From: Burton, Ross @ 2018-12-20 15:47 UTC (permalink / raw)
  To: Khem Raj; +Cc: Bradley Bishop, OpenBMC, james.feist, OE-core

On Thu, 20 Dec 2018 at 15:37, Khem Raj <raj.khem@gmail.com> wrote:
> > As we build the cross gcc we know what is in it.  Other toolchains be
> > they clang, ICC, or external GCCs, can override AR just like they do
> > the other variables.
>
> Yes they can, but what doe this buy us ? except we make Core toolchain
> gcc dependent one step more.

The core toolchain is currently GCC dependent already by definition.
I'm actually about to start working on abstracting the core so it
doesn't make any assumptions, like how there's no hard assumption of
glibc in the core.

Ross

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

* Re: flto automake
@ 2018-12-20 15:47             ` Burton, Ross
  0 siblings, 0 replies; 23+ messages in thread
From: Burton, Ross @ 2018-12-20 15:47 UTC (permalink / raw)
  To: Khem Raj; +Cc: OpenBMC, Bradley Bishop, james.feist, OE-core

On Thu, 20 Dec 2018 at 15:37, Khem Raj <raj.khem@gmail.com> wrote:
> > As we build the cross gcc we know what is in it.  Other toolchains be
> > they clang, ICC, or external GCCs, can override AR just like they do
> > the other variables.
>
> Yes they can, but what doe this buy us ? except we make Core toolchain
> gcc dependent one step more.

The core toolchain is currently GCC dependent already by definition.
I'm actually about to start working on abstracting the core so it
doesn't make any assumptions, like how there's no hard assumption of
glibc in the core.

Ross


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

* Re: [OE-core] flto automake
  2018-12-20 15:36           ` Khem Raj
@ 2018-12-20 15:48             ` Burton, Ross
  -1 siblings, 0 replies; 23+ messages in thread
From: Burton, Ross @ 2018-12-20 15:48 UTC (permalink / raw)
  To: Khem Raj; +Cc: Bradley Bishop, OpenBMC, james.feist, OE-core

On Thu, 20 Dec 2018 at 15:37, Khem Raj <raj.khem@gmail.com> wrote:
> > Well, I built core-image-sato core-image-weston with AR=gcc-ar
> > RANLIB=gcc-ranlib globally and it worked fine.
>
> Please build a lot more. These images cover only handful of recipes
> there are problems like
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77576
>
> which we might have to contend.

That bug from two years ago suggests that the gcc-ar wrapper isn't
required if GCC has been configured properly.  I guess we need a test
case.

Ross

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

* Re: flto automake
@ 2018-12-20 15:48             ` Burton, Ross
  0 siblings, 0 replies; 23+ messages in thread
From: Burton, Ross @ 2018-12-20 15:48 UTC (permalink / raw)
  To: Khem Raj; +Cc: OpenBMC, Bradley Bishop, james.feist, OE-core

On Thu, 20 Dec 2018 at 15:37, Khem Raj <raj.khem@gmail.com> wrote:
> > Well, I built core-image-sato core-image-weston with AR=gcc-ar
> > RANLIB=gcc-ranlib globally and it worked fine.
>
> Please build a lot more. These images cover only handful of recipes
> there are problems like
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77576
>
> which we might have to contend.

That bug from two years ago suggests that the gcc-ar wrapper isn't
required if GCC has been configured properly.  I guess we need a test
case.

Ross


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

* Re: [OE-core] flto automake
  2018-12-20 15:48             ` Burton, Ross
@ 2018-12-20 17:04               ` Khem Raj
  -1 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2018-12-20 17:04 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Bradley Bishop, OpenBMC, James Feist, OE-core

On Thu, Dec 20, 2018 at 7:48 AM Burton, Ross <ross.burton@intel.com> wrote:
>
> On Thu, 20 Dec 2018 at 15:37, Khem Raj <raj.khem@gmail.com> wrote:
> > > Well, I built core-image-sato core-image-weston with AR=gcc-ar
> > > RANLIB=gcc-ranlib globally and it worked fine.
> >
> > Please build a lot more. These images cover only handful of recipes
> > there are problems like
> >
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77576
> >
> > which we might have to contend.
>
> That bug from two years ago suggests that the gcc-ar wrapper isn't
> required if GCC has been configured properly.  I guess we need a test
> case.

cmake's approach of defined COMPILER_AR and COMPILER_RANLIB etc seems
better to me. where it can be uses selectively only when LTO is in
play.

>
> Ross

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

* Re: flto automake
@ 2018-12-20 17:04               ` Khem Raj
  0 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2018-12-20 17:04 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OpenBMC, Bradley Bishop, James Feist, OE-core

On Thu, Dec 20, 2018 at 7:48 AM Burton, Ross <ross.burton@intel.com> wrote:
>
> On Thu, 20 Dec 2018 at 15:37, Khem Raj <raj.khem@gmail.com> wrote:
> > > Well, I built core-image-sato core-image-weston with AR=gcc-ar
> > > RANLIB=gcc-ranlib globally and it worked fine.
> >
> > Please build a lot more. These images cover only handful of recipes
> > there are problems like
> >
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77576
> >
> > which we might have to contend.
>
> That bug from two years ago suggests that the gcc-ar wrapper isn't
> required if GCC has been configured properly.  I guess we need a test
> case.

cmake's approach of defined COMPILER_AR and COMPILER_RANLIB etc seems
better to me. where it can be uses selectively only when LTO is in
play.

>
> Ross


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

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

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-18 18:08 flto automake James Feist
2018-12-19  0:33 ` Brad Bishop
2018-12-19  1:07   ` [OE-core] " Burton, Ross
2018-12-19  1:07     ` Burton, Ross
2018-12-19  1:58     ` [OE-core] " Lei YU
2018-12-19 10:00     ` Burton, Ross
2018-12-19 10:00       ` Burton, Ross
2018-12-19 10:43       ` [OE-core] " Richard Purdie
2018-12-19 10:43         ` Richard Purdie
2018-12-20  1:19     ` [OE-core] " Khem Raj
2018-12-20  1:19       ` Khem Raj
2018-12-20 12:37       ` [OE-core] " Burton, Ross
2018-12-20 12:37         ` Burton, Ross
2018-12-20 15:36         ` [OE-core] " Khem Raj
2018-12-20 15:36           ` Khem Raj
2018-12-20 15:47           ` [OE-core] " Burton, Ross
2018-12-20 15:47             ` Burton, Ross
2018-12-20 15:48           ` [OE-core] " Burton, Ross
2018-12-20 15:48             ` Burton, Ross
2018-12-20 17:04             ` [OE-core] " Khem Raj
2018-12-20 17:04               ` Khem Raj
2018-12-20  1:16   ` [OE-core] " Khem Raj
2018-12-20  1:16     ` Khem Raj

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.