[PATCH V4 1/8] spl: guard u_boot_any with X86

Tom Rini trini at konsulko.com
Mon May 23 16:10:27 CEST 2022


On Mon, May 23, 2022 at 06:28:44AM +0000, Peng Fan (OSS) wrote:
> > Subject: Re: [PATCH V4 1/8] spl: guard u_boot_any with X86
> > 
> > On Sat, May 21, 2022 at 08:33:56AM +0000, Peng Fan wrote:
> > > > Subject: Re: [PATCH V4 1/8] spl: guard u_boot_any with X86
> > > >
> > > > On Fri, May 20, 2022 at 10:10:40PM +0800, Peng Fan (OSS) wrote:
> > > >
> > > > > From: Peng Fan <peng.fan at nxp.com>
> > > > >
> > > > > set the symbol as weak not work if LTO is enabled. Since
> > > > > u_boot_any is only used on X86 for now, so guard it with X86,
> > > > > otherwise build break if we use BINMAN_SYMBOLS on i.MX.
> > > > >
> > > > > Tested-by: Tim Harvey <tharvey at gateworks.com> #imx8m[m,n,p]-venice
> > > > > Signed-off-by: Peng Fan <peng.fan at nxp.com>
> > > > > ---
> > > > >  common/spl/spl.c     | 8 ++++++--
> > > > >  common/spl/spl_ram.c | 4 ++++
> > > > >  2 files changed, 10 insertions(+), 2 deletions(-)
> > > >
> > > > I think we long term need to figure this out and address it so LTO
> > > > works.  But for now can you please guard this with a test on LTO
> > > > instead, so it's clear where the problem is?
> > >
> > > Sorry, I could not get your point about guard with a test on LTO.
> > >
> > > Actually binman weak symbol will report a warning log if there is no
> > > u_boot_any binman symbol. Since only X86 use it, I guard with X86.
> > 
> > Why are you mentioning LTO in the commit message?  When I read the
> > commit message it sounds like you're saying the problem is that LTO doesn't
> > like how this symbol is handled, but if LTO was disabled, everything would be
> > fine.  If it's not LTO-related, please re-word the message instead.
> 
> Sorry, I could reword the commit message, but currently I have no better
> idea to address the issue unless use X86 as a guard in the code as this
> patch does. If you agree the code in this patch, I could reword commit msg
> and send v5.

Well, lets see what Alper says in the other part of the thread.  I'd
really like to solve this not work around this.  But I'll take
documenting the problem for the person that has X86 && LTO as good
enough for the moment.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220523/7657ead2/attachment.sig>


More information about the U-Boot mailing list