[PATCH 5/6] pogo_v4: Disable LTO

Tony Dinh mibodhi at gmail.com
Wed Nov 23 23:34:05 CET 2022


Hi Tom,

On Wed, Nov 23, 2022 at 5:45 AM Tom Rini <trini at konsulko.com> wrote:
>
> On Tue, Nov 22, 2022 at 01:09:55PM -0800, Tony Dinh wrote:
> > Resend to include the mailing list!
> >
> > Tony
> >
> > On Tue, Nov 22, 2022 at 11:58 AM Tony Dinh <mibodhi at gmail.com> wrote:
> > >
> > > Hi Tom,
> > >
> > > On Tue, Nov 22, 2022 at 9:32 AM Tom Rini <trini at konsulko.com> wrote:
> > > >
> > > > With gcc-12.2 we now get:
> > > > lib/zlib/inflate.c:360: undefined reference to `__gnu_thumb1_case_si'
> > > > when building this platform. This seems like some odd problem with LTO
> > > > and Thumb, but since the platform continues to link, I assume it's
> > > > within size constraints, so lets just disable LTO for now.
> > >
> > > We don't have a hard size constraint for this board. Thumb and LTO
> > > were to help keep the image 512K or less (by convention, for some
> > > downstream scripts).
>
> Ah, well, uh-oh.  Then we needed to add:
> CONFIG_HAS_BOARD_SIZE_LIMIT=y
> CONFIG_BOARD_SIZE_LIMIT=524288
> to the config. Which is fine now, but without both LTO and thumb, we now
> are too big. So this means digging harder at that error message.  Which
> in turn shows that 806f86bd826e ("arm: lib: Import Thumb1 functions") is
> where we imported the __gnu_thumb1_case_* functions we have now, and
> need to do similar work to import (and then do the follow-up
> improvements to) __gnu_thumb1_case_si. Can you please take a look at
> that? FWIW, the gcc-12.2.0 toolchain I'm using is just
> https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-arm-linux-gnueabi.tar.xz

I think I was not clear in my previous response. We did not implement
a hard size constraint, but only tried to keep it small at 512K. If it
grows larger, it's OK. Others and I just need to modify the flashing
script, which is not a big deal. So removing LTO and Thumb is fine to
get through this gcc build problem. Nothing will break because it is
still small enough at 670K (built using gcc 11).

I'm not well versed in troubleshooting this type of compiler problem.
I could try, but I think someone like Simon would be able to solve it
quicker. Please let me know what you think.

All the best,
Tony

>
> --
> Tom


More information about the U-Boot mailing list