[U-Boot] How to build multiple object files from one source?

Tom Rini trini at konsulko.com
Fri Jun 8 19:21:56 UTC 2018


On Fri, Jun 08, 2018 at 07:18:34PM +0000, Alexey Brodkin wrote:
> Hello,
> 
> I've been playing with libgcc sources imported in U-Boot [1] and so far
> for some platforms it works but for some doesn't.
> 
> The problem I just discovered is how libgcc's assembly is composed.
> It has a couple of not very usual features:
>  1. The same labels used in different functions
>  2. A lot of functions are collected in the same source file [2]
>  3. Every function is wrapped in individual #ifdef
>  4. Very special target is used for compilation [3] which iterates through
>     the list of all those per-function defines LIB1ASMFUNCS [4] and compiles
>     the same one lib1funcs.S many times each time with just one define
>     provided and creates similarly named .o file.
>     Then all objects are easily collected in libgcc.s because all labels
>     are already resolved into offsets.
> 
> And I'm wondering if something similar could be achieved in U-Boot?

I would suggest, given that we have good Kbuild infrastructure now, and
that sounds a lot like how, from the last time I skimmed the current kernel
lib1asmfunc stuff for ARM, it's done today there.  It's not a 1:1 but
it's cleaner/clearer than what we have today.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180608/8b7248b2/attachment.sig>


More information about the U-Boot mailing list