[Skiboot] [PATCH] build: use thin archives rather than incremental linking

Stewart Smith stewart at linux.vnet.ibm.com
Thu Mar 1 15:08:13 AEDT 2018


Nicholas Piggin <npiggin at gmail.com> writes:
> This changes to build system to use thin archives rather than
> incremental linking for built-in.o, similar to recent change to Linux.
> built-in.o is renamed to built-in.a, and is created as a thin archive
> with no index, for speed and size. All built-in.a are aggregated into
> a skiboot.tmp.a which is a thin archive built with an index, making it
> suitable or linking. This is input into the final link.
>
> The advantags of build size and linker code placement flexibility are
> not as great with skiboot as a bigger project like Linux, but it's a
> conceptually better way to build, and is more compatible with link
> time optimisation in toolchains which might be interesting for skiboot
> particularly for size reductions.
>
> Size of build tree before this patch is 34.4MB, afterwards 23.1MB.
>
> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
> ---
>  Makefile.main                  | 14 +++++++++-----
>  Makefile.rules                 |  5 +++--
>  asm/Makefile.inc               |  2 +-
>  ccan/Makefile.inc              |  2 +-
>  core/Makefile.inc              |  2 +-
>  hdata/Makefile.inc             |  2 +-
>  hw/Makefile.inc                |  2 +-
>  hw/ast-bmc/Makefile.inc        |  2 +-
>  hw/ec/Makefile.inc             |  2 +-
>  hw/fsp/Makefile.inc            |  2 +-
>  hw/ipmi/Makefile.inc           |  2 +-
>  libc/Makefile.inc              |  2 +-
>  libc/ctype/Makefile.inc        |  2 +-
>  libc/stdio/Makefile.inc        |  2 +-
>  libc/stdlib/Makefile.inc       |  2 +-
>  libc/string/Makefile.inc       |  2 +-
>  libfdt/Makefile.inc            |  2 +-
>  libflash/Makefile.inc          |  2 +-
>  libpore/Makefile.inc           |  2 +-
>  libstb/Makefile.inc            |  2 +-
>  libstb/drivers/Makefile.inc    |  2 +-
>  libstb/mbedtls/Makefile.inc    |  2 +-
>  libstb/tss/Makefile.inc        |  2 +-
>  libxz/Makefile.inc             |  2 +-
>  platforms/Makefile.inc         |  2 +-
>  platforms/astbmc/Makefile.inc  |  2 +-
>  platforms/ibm-fsp/Makefile.inc |  2 +-
>  platforms/mambo/Makefile.inc   |  2 +-
>  platforms/qemu/Makefile.inc    |  2 +-
>  platforms/rhesus/Makefile.inc  |  2 +-
>  30 files changed, 40 insertions(+), 35 deletions(-)

Cool, merged to master as of f6159cff5d91e5c0810d0c9285a1d2370a38e2b7

(although it's not relevant to this patch, makefiles still make me cry...)

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list