mbox series

[XEN,v4,00/18] xen: Build system improvements

Message ID 20200331103102.1105674-1-anthony.perard@citrix.com (mailing list archive)
Headers show
Series xen: Build system improvements | expand

Message

Anthony PERARD March 31, 2020, 10:30 a.m. UTC
Patch series available in this git branch:
https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git br.build-system-xen-v4

v4:
- some patch already applied.
- Have added patches from "xen/arm: Configure early printk via Kconfig" series.
- Some new patch to add documentation or fix issues, and patch to improve
  compat header generation.
Other changes are detailed in patches.

v3:
- new patches that do some cleanup or fix issues
- have rework most patches, to have better commit message or change the coding
  style, or fix issues that I've seen. There were some cases where CFLAGS were
  missing.
  See patch notes for details
- introduce if_changed*. That plenty of new patches on top of what we had in v2.
  (those changes ignore CONFIG_LTO=y, I'll see about fixing that later)

(There is more to come in order to use fixdep from Linux, but that's not ready)

v2.1:
- some fixes

v2:
Rather than taking Kbuild and making it work with Xen, the v2 takes the opposite
approach of slowly transforming our current build system into Kbuild. That have
the advantage of keeping all the feature we have and making the patches much
easier to review. Kconfig update is done in an other patch series.

Hi,

I have work toward building Xen (the hypervisor) with Linux's build system,
Kbuild.

The main reason for that is to be able to have out-of-tree build. It's annoying
when a build fail because of the pvshim. Other benefit is a much faster
rebuild, and `make clean` doesn't take ages, and better dependencies to figure
out what needs to be rebuild.

So, we are not there yet, but the series already contain quite a few
improvement and cleanup. More patches are going to be added to the series.

Cheers,

Anthony PERARD (18):
  xen/arm: Rename all early printk macro
  xen/arm: Configure early printk via Kconfig
  build,arm: Fix deps check of head.o
  xen/build: include include/config/auto.conf in main Makefile
  xen/build: use new $(c_flags) and $(a_flags) instead of $(CFLAGS)
  xen/build: have the root Makefile generates the CFLAGS
  build: Introduce documentation for xen Makefiles
  xen/build: introduce if_changed and if_changed_rule
  xen/build: Start using if_changed
  xen/build: use if_changed on built_in.o
  xen/build: Use if_changed_rules with %.o:%.c targets
  xen/build: factorise generation of the linker scripts
  xen/build: Use if_changed for prelink*.o
  xen,symbols: rework file symbols selection
  xen/build: use if_changed to build guest_%.o
  build,xsm: Fix multiple call
  build,include: rework compat-build-source.py
  build,include: rework compat-build-header.py

 .gitignore                                    |   1 +
 docs/misc/arm/early-printk.txt                |  71 ++---
 docs/misc/xen-makefiles/makefiles.rst         | 186 +++++++++++
 xen/Kconfig.debug                             |   2 +
 xen/Makefile                                  | 209 +++++++++++--
 xen/Rules.mk                                  | 235 ++++++++------
 xen/arch/arm/Kconfig.debug                    | 289 ++++++++++++++++++
 xen/arch/arm/Makefile                         |  27 +-
 xen/arch/arm/Rules.mk                         |  93 ------
 xen/arch/arm/{Rules.mk => arch.mk}            |  79 +----
 xen/arch/arm/arm32/Makefile                   |   2 +-
 xen/arch/arm/arm32/debug-8250.inc             |   2 +-
 xen/arch/arm/arm32/debug-pl011.inc            |   4 +-
 xen/arch/arm/arm32/debug-scif.inc             |   4 +-
 xen/arch/arm/arm32/debug.S                    |   4 +-
 xen/arch/arm/arm32/head.S                     |  10 +-
 xen/arch/arm/arm64/Makefile                   |   2 +-
 xen/arch/arm/arm64/debug-8250.inc             |   4 +-
 xen/arch/arm/arm64/debug-pl011.inc            |   4 +-
 xen/arch/arm/arm64/debug.S                    |   4 +-
 xen/arch/arm/arm64/head.S                     |  10 +-
 xen/arch/arm/efi/Makefile                     |   2 +-
 .../minios.cfg => xen/arch/x86/Kconfig.debug  |   0
 xen/arch/x86/Makefile                         |  41 +--
 xen/arch/x86/Rules.mk                         |  91 +-----
 xen/arch/x86/{Rules.mk => arch.mk}            |  17 +-
 xen/arch/x86/efi/Makefile                     |   9 +-
 xen/arch/x86/mm/Makefile                      |  14 +-
 xen/arch/x86/mm/hap/Makefile                  |  15 +-
 xen/arch/x86/mm/shadow/Makefile               |  14 +-
 xen/common/libelf/Makefile                    |  14 +-
 xen/common/libfdt/Makefile                    |  13 +-
 xen/include/Makefile                          |  24 +-
 xen/include/asm-arm/early_printk.h            |   2 +-
 xen/scripts/Kbuild.include                    | 112 +++++++
 xen/tools/compat-build-header.py              |  36 ++-
 xen/tools/compat-build-source.py              |   8 +-
 xen/tools/symbols.c                           |  20 +-
 xen/xsm/flask/Makefile                        |  19 +-
 xen/xsm/flask/ss/Makefile                     |   2 +-
 40 files changed, 1145 insertions(+), 550 deletions(-)
 create mode 100644 docs/misc/xen-makefiles/makefiles.rst
 create mode 100644 xen/arch/arm/Kconfig.debug
 copy xen/arch/arm/{Rules.mk => arch.mk} (15%)
 copy stubdom/c/minios.cfg => xen/arch/x86/Kconfig.debug (100%)
 copy xen/arch/x86/{Rules.mk => arch.mk} (87%)

Comments

Julien Grall April 1, 2020, 9:52 a.m. UTC | #1
Hi Anthony,

On 31/03/2020 11:30, Anthony PERARD wrote:
> Anthony PERARD (18):
>    xen/arm: Rename all early printk macro
>    xen/arm: Configure early printk via Kconfig
>    build,arm: Fix deps check of head.o

I have merged the first 3 patches.

Cheers,