[U-Boot] [PATCH v3 0/4] Big acceleration of Kbuild performance

Masahiro Yamada yamada.m at jp.panasonic.com
Wed Mar 5 08:59:36 CET 2014


Kbuild brought about many advantages for us but a significant
performance regression was reported by Simon Glass.

After some discussions and analysis, it turned out
its main cause is in $(call cc-option,...).

Historically, U-Boot parses all config.mk
(arch/*/config.mk and board/*/config.mk)
every time descending into subdirectories.
That means cc-options are evaluated over and over again.

$(call cc-option,...) is useful but costly.
So we want to evaluate them only in ./Makefile
and spl/Makefile and export compiler flags.

1/4 through 3/4 are preparation for 4/4.

4/4 is what we really want to do.
By applying it, I think Kbuild will get much faster.

I confirmed this series can apply on commit 32907339.


Masahiro Yamada (4):
  kbuild,blackfin: Add CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED
  kbuild: add CONFIG_ prefix to USE_PRIVATE_LIBGCC
  config.mk: specify the exact path to standalone linker script
  kbuild: improve Kbuild speed

 Makefile                                | 13 +++++++------
 arch/arm/cpu/arm720t/tegra114/config.mk | 19 -------------------
 arch/arm/cpu/arm720t/tegra124/config.mk |  7 -------
 arch/arm/cpu/arm720t/tegra20/config.mk  | 10 ----------
 arch/arm/cpu/arm720t/tegra30/config.mk  | 19 -------------------
 arch/arm/lib/Makefile                   | 13 ++-----------
 arch/blackfin/config.mk                 |  1 +
 arch/mips/cpu/mips32/config.mk          |  3 ++-
 arch/mips/cpu/mips64/config.mk          |  3 ++-
 arch/mips/cpu/xburst/config.mk          |  3 ++-
 arch/mips/lib/Makefile                  |  7 +------
 arch/nds32/config.mk                    |  3 ++-
 arch/powerpc/lib/Makefile               |  6 +-----
 arch/sh/lib/Makefile                    | 14 ++------------
 arch/sparc/config.mk                    |  4 +++-
 arch/x86/config.mk                      |  2 +-
 board/bct-brettl2/config.mk             | 13 -------------
 board/bf518f-ezbrd/config.mk            | 13 -------------
 board/bf526-ezbrd/config.mk             | 13 -------------
 board/bf527-ad7160-eval/config.mk       | 13 -------------
 board/bf527-ezkit/config.mk             | 13 -------------
 board/bf527-sdp/config.mk               |  5 -----
 board/bf533-ezkit/config.mk             |  5 -----
 board/bf533-stamp/config.mk             |  5 -----
 board/bf537-stamp/config.mk             |  5 -----
 board/bf538f-ezkit/config.mk            |  5 -----
 board/bf548-ezkit/config.mk             |  5 -----
 board/bf561-acvilon/config.mk           |  5 -----
 board/bf561-ezkit/config.mk             |  5 -----
 board/br4/config.mk                     | 15 ---------------
 board/cm-bf527/config.mk                | 13 -------------
 board/cm-bf533/config.mk                |  5 -----
 board/cm-bf537e/config.mk               |  5 -----
 board/cm-bf537u/config.mk               |  5 -----
 board/cm-bf548/config.mk                |  5 -----
 board/cm-bf561/config.mk                |  5 -----
 board/ip04/config.mk                    |  5 -----
 board/pr1/config.mk                     | 15 ---------------
 board/tcm-bf518/config.mk               | 13 -------------
 board/tcm-bf537/config.mk               |  5 -----
 config.mk                               | 28 ++++++++++++++++++++--------
 examples/standalone/Makefile            |  5 ++---
 include/configs/bct-brettl2.h           |  2 +-
 include/configs/bf518f-ezbrd.h          |  2 +-
 include/configs/bf526-ezbrd.h           |  1 +
 include/configs/bf527-ad7160-eval.h     |  2 +-
 include/configs/bf527-ezkit.h           |  2 +-
 include/configs/bf527-sdp.h             |  2 +-
 include/configs/bf533-ezkit.h           |  2 +-
 include/configs/bf533-stamp.h           |  1 +
 include/configs/bf537-stamp.h           |  1 +
 include/configs/bf538f-ezkit.h          |  2 +-
 include/configs/bf548-ezkit.h           |  1 +
 include/configs/bf561-acvilon.h         |  2 +-
 include/configs/bf561-ezkit.h           |  1 +
 include/configs/br4.h                   |  2 +-
 include/configs/cm-bf527.h              |  2 +-
 include/configs/cm-bf533.h              |  2 +-
 include/configs/cm-bf537e.h             |  1 +
 include/configs/cm-bf537u.h             |  2 +-
 include/configs/cm-bf548.h              |  1 +
 include/configs/cm-bf561.h              |  2 +-
 include/configs/ip04.h                  |  1 +
 include/configs/pr1.h                   |  2 +-
 include/configs/tcm-bf518.h             |  2 +-
 include/configs/tcm-bf537.h             |  2 +-
 include/configs/tegra-common.h          |  4 ++++
 lib/Makefile                            |  2 ++
 scripts/Makefile.build                  | 10 +++++-----
 scripts/Makefile.lib                    |  7 +++----
 spl/Makefile                            | 17 ++++++++---------
 71 files changed, 94 insertions(+), 342 deletions(-)
 delete mode 100644 arch/arm/cpu/arm720t/tegra114/config.mk
 delete mode 100644 arch/arm/cpu/arm720t/tegra124/config.mk
 delete mode 100644 arch/arm/cpu/arm720t/tegra20/config.mk
 delete mode 100644 arch/arm/cpu/arm720t/tegra30/config.mk
 delete mode 100644 board/bct-brettl2/config.mk
 delete mode 100644 board/bf518f-ezbrd/config.mk
 delete mode 100644 board/bf526-ezbrd/config.mk
 delete mode 100644 board/bf527-ad7160-eval/config.mk
 delete mode 100644 board/bf527-ezkit/config.mk
 delete mode 100644 board/br4/config.mk
 delete mode 100644 board/cm-bf527/config.mk
 delete mode 100644 board/pr1/config.mk
 delete mode 100644 board/tcm-bf518/config.mk

-- 
1.8.3.2



More information about the U-Boot mailing list