mbox series

[00/12] Move target configuration to Meson

Message ID 20200923091131.1591563-1-pbonzini@redhat.com
Headers show
Series Move target configuration to Meson | expand

Message

Paolo Bonzini Sept. 23, 2020, 9:11 a.m. UTC
With configure+make, the creation of the config-target.h files was
detached from the build and had to be shared with config-host.h.
With meson, using separate configure_files to format config-host.h
and config-target.h comes for free; therefore we can craft the
configure_file input independent of what the .mak configuration looks
like.

The other part of config-target.mak is accelerators, where the
detection code is easily moved to meson.

This lets us simplify the .mak configuration to the point that we
can just keep it in default-configs/ and drop the code that generates
it.

Compared to the RFC this mostly fixes a bunch of small issues found
by Richard, and completes the simplification of configuration files:
it introduces a TARGET_ARCH key and removes TARGET_BASE_ARCH and
TARGET_ABI_DIR if they concide with TARGET_ARCH.

Paolo Bonzini (12):
  default-configs: move files to default-configs/devices/
  configure: convert accelerator variables to meson options
  configure: rewrite accelerator defaults as tests
  configure: move accelerator logic to meson
  configure: remove dead variable
  configure: move CONFIG_* symbols to meson
  configure: remove useless config-target.mak symbols
  configure: remove target configuration
  default-configs: remove default-configs/devices for user-mode targets
  configure: move OpenBSD W^X test to meson
  default-configs: use TARGET_ARCH key
  default-configs: remove redundant keys

 configure                                     | 586 ++----------------
 default-configs/aarch64-linux-user.mak        |   1 -
 default-configs/aarch64_be-linux-user.mak     |   1 -
 default-configs/alpha-linux-user.mak          |   1 -
 default-configs/arm-linux-user.mak            |   1 -
 default-configs/armeb-linux-user.mak          |   1 -
 default-configs/cris-linux-user.mak           |   1 -
 .../{ => devices}/aarch64-softmmu.mak         |   0
 .../{ => devices}/alpha-softmmu.mak           |   0
 default-configs/{ => devices}/arm-softmmu.mak |   0
 default-configs/{ => devices}/avr-softmmu.mak |   0
 .../{ => devices}/cris-softmmu.mak            |   0
 .../{ => devices}/hppa-softmmu.mak            |   0
 .../{ => devices}/i386-softmmu.mak            |   0
 .../{ => devices}/lm32-softmmu.mak            |   0
 .../{ => devices}/m68k-softmmu.mak            |   0
 .../{ => devices}/microblaze-softmmu.mak      |   0
 .../{ => devices}/microblazeel-softmmu.mak    |   0
 .../{ => devices}/mips-softmmu-common.mak     |   0
 .../{ => devices}/mips-softmmu.mak            |   0
 .../{ => devices}/mips64-softmmu.mak          |   0
 .../{ => devices}/mips64el-softmmu.mak        |   0
 .../{ => devices}/mipsel-softmmu.mak          |   0
 .../{ => devices}/moxie-softmmu.mak           |   0
 .../{ => devices}/nios2-softmmu.mak           |   0
 .../{ => devices}/or1k-softmmu.mak            |   0
 default-configs/{ => devices}/ppc-softmmu.mak |   0
 .../{ => devices}/ppc64-softmmu.mak           |   0
 .../{ => devices}/riscv32-softmmu.mak         |   0
 .../{ => devices}/riscv64-softmmu.mak         |   0
 default-configs/{ => devices}/rx-softmmu.mak  |   0
 .../{ => devices}/s390x-softmmu.mak           |   0
 default-configs/{ => devices}/sh4-softmmu.mak |   0
 .../{ => devices}/sh4eb-softmmu.mak           |   0
 .../{ => devices}/sparc-softmmu.mak           |   0
 .../{ => devices}/sparc64-softmmu.mak         |   0
 .../{ => devices}/tricore-softmmu.mak         |   0
 .../{ => devices}/unicore32-softmmu.mak       |   0
 .../{ => devices}/x86_64-softmmu.mak          |   0
 .../{ => devices}/xtensa-softmmu.mak          |   0
 .../{ => devices}/xtensaeb-softmmu.mak        |   0
 default-configs/hppa-linux-user.mak           |   1 -
 default-configs/i386-bsd-user.mak             |   1 -
 default-configs/i386-linux-user.mak           |   1 -
 default-configs/m68k-linux-user.mak           |   1 -
 default-configs/microblaze-linux-user.mak     |   1 -
 default-configs/microblazeel-linux-user.mak   |   1 -
 default-configs/mips-linux-user.mak           |   1 -
 default-configs/mips64-linux-user.mak         |   1 -
 default-configs/mips64el-linux-user.mak       |   1 -
 default-configs/mipsel-linux-user.mak         |   1 -
 default-configs/mipsn32-linux-user.mak        |   1 -
 default-configs/mipsn32el-linux-user.mak      |   1 -
 default-configs/nios2-linux-user.mak          |   1 -
 default-configs/or1k-linux-user.mak           |   1 -
 default-configs/ppc-linux-user.mak            |   1 -
 default-configs/ppc64-linux-user.mak          |   1 -
 default-configs/ppc64abi32-linux-user.mak     |   1 -
 default-configs/ppc64le-linux-user.mak        |   1 -
 default-configs/riscv32-linux-user.mak        |   1 -
 default-configs/riscv64-linux-user.mak        |   1 -
 default-configs/s390x-linux-user.mak          |   1 -
 default-configs/sh4-linux-user.mak            |   1 -
 default-configs/sh4eb-linux-user.mak          |   1 -
 default-configs/sparc-bsd-user.mak            |   1 -
 default-configs/sparc-linux-user.mak          |   1 -
 default-configs/sparc32plus-linux-user.mak    |   1 -
 default-configs/sparc64-bsd-user.mak          |   1 -
 default-configs/sparc64-linux-user.mak        |   1 -
 .../targets/aarch64-linux-user.mak            |   4 +
 default-configs/targets/aarch64-softmmu.mak   |   4 +
 .../targets/aarch64_be-linux-user.mak         |   5 +
 default-configs/targets/alpha-linux-user.mak  |   4 +
 default-configs/targets/alpha-softmmu.mak     |   3 +
 default-configs/targets/arm-linux-user.mak    |   5 +
 default-configs/targets/arm-softmmu.mak       |   3 +
 default-configs/targets/armeb-linux-user.mak  |   6 +
 default-configs/targets/avr-softmmu.mak       |   2 +
 default-configs/targets/cris-linux-user.mak   |   1 +
 default-configs/targets/cris-softmmu.mak      |   1 +
 default-configs/targets/hppa-linux-user.mak   |   5 +
 default-configs/targets/hppa-softmmu.mak      |   4 +
 default-configs/targets/i386-bsd-user.mak     |   2 +
 default-configs/targets/i386-linux-user.mak   |   4 +
 default-configs/targets/i386-softmmu.mak      |   3 +
 default-configs/targets/lm32-softmmu.mak      |   2 +
 default-configs/targets/m68k-linux-user.mak   |   6 +
 default-configs/targets/m68k-softmmu.mak      |   3 +
 .../targets/microblaze-linux-user.mak         |   5 +
 .../targets/microblaze-softmmu.mak            |   3 +
 .../targets/microblazeel-linux-user.mak       |   4 +
 .../targets/microblazeel-softmmu.mak          |   2 +
 default-configs/targets/mips-linux-user.mak   |   6 +
 default-configs/targets/mips-softmmu.mak      |   4 +
 default-configs/targets/mips64-linux-user.mak |   7 +
 default-configs/targets/mips64-softmmu.mak    |   4 +
 .../targets/mips64el-linux-user.mak           |   6 +
 default-configs/targets/mips64el-softmmu.mak  |   3 +
 default-configs/targets/mipsel-linux-user.mak |   5 +
 default-configs/targets/mipsel-softmmu.mak    |   3 +
 .../targets/mipsn32-linux-user.mak            |   8 +
 .../targets/mipsn32el-linux-user.mak          |   7 +
 default-configs/targets/moxie-softmmu.mak     |   2 +
 default-configs/targets/nios2-linux-user.mak  |   1 +
 default-configs/targets/nios2-softmmu.mak     |   1 +
 default-configs/targets/or1k-linux-user.mak   |   2 +
 default-configs/targets/or1k-softmmu.mak      |   2 +
 default-configs/targets/ppc-linux-user.mak    |   5 +
 default-configs/targets/ppc-softmmu.mak       |   3 +
 default-configs/targets/ppc64-linux-user.mak  |   7 +
 default-configs/targets/ppc64-softmmu.mak     |   5 +
 .../targets/ppc64abi32-linux-user.mak         |   8 +
 .../targets/ppc64le-linux-user.mak            |   6 +
 .../targets/riscv32-linux-user.mak            |   4 +
 default-configs/targets/riscv32-softmmu.mak   |   4 +
 .../targets/riscv64-linux-user.mak            |   4 +
 default-configs/targets/riscv64-softmmu.mak   |   4 +
 default-configs/targets/rx-softmmu.mak        |   2 +
 default-configs/targets/s390x-linux-user.mak  |   5 +
 default-configs/targets/s390x-softmmu.mak     |   4 +
 default-configs/targets/sh4-linux-user.mak    |   5 +
 default-configs/targets/sh4-softmmu.mak       |   2 +
 default-configs/targets/sh4eb-linux-user.mak  |   6 +
 default-configs/targets/sh4eb-softmmu.mak     |   3 +
 default-configs/targets/sparc-bsd-user.mak    |   3 +
 default-configs/targets/sparc-linux-user.mak  |   5 +
 default-configs/targets/sparc-softmmu.mak     |   3 +
 .../targets/sparc32plus-linux-user.mak        |   8 +
 default-configs/targets/sparc64-bsd-user.mak  |   4 +
 .../targets/sparc64-linux-user.mak            |   6 +
 default-configs/targets/sparc64-softmmu.mak   |   4 +
 default-configs/targets/tilegx-linux-user.mak |   1 +
 default-configs/targets/tricore-softmmu.mak   |   1 +
 default-configs/targets/unicore32-softmmu.mak |   1 +
 default-configs/targets/x86_64-bsd-user.mak   |   3 +
 default-configs/targets/x86_64-linux-user.mak |   5 +
 default-configs/targets/x86_64-softmmu.mak    |   4 +
 default-configs/targets/xtensa-linux-user.mak |   5 +
 default-configs/targets/xtensa-softmmu.mak    |   3 +
 .../targets/xtensaeb-linux-user.mak           |   6 +
 default-configs/targets/xtensaeb-softmmu.mak  |   4 +
 default-configs/tilegx-linux-user.mak         |   1 -
 default-configs/x86_64-bsd-user.mak           |   1 -
 default-configs/x86_64-linux-user.mak         |   1 -
 default-configs/xtensa-linux-user.mak         |   1 -
 default-configs/xtensaeb-linux-user.mak       |   1 -
 meson.build                                   | 181 +++++-
 meson_options.txt                             |  15 +
 148 files changed, 522 insertions(+), 584 deletions(-)
 delete mode 100644 default-configs/aarch64-linux-user.mak
 delete mode 100644 default-configs/aarch64_be-linux-user.mak
 delete mode 100644 default-configs/alpha-linux-user.mak
 delete mode 100644 default-configs/arm-linux-user.mak
 delete mode 100644 default-configs/armeb-linux-user.mak
 delete mode 100644 default-configs/cris-linux-user.mak
 rename default-configs/{ => devices}/aarch64-softmmu.mak (100%)
 rename default-configs/{ => devices}/alpha-softmmu.mak (100%)
 rename default-configs/{ => devices}/arm-softmmu.mak (100%)
 rename default-configs/{ => devices}/avr-softmmu.mak (100%)
 rename default-configs/{ => devices}/cris-softmmu.mak (100%)
 rename default-configs/{ => devices}/hppa-softmmu.mak (100%)
 rename default-configs/{ => devices}/i386-softmmu.mak (100%)
 rename default-configs/{ => devices}/lm32-softmmu.mak (100%)
 rename default-configs/{ => devices}/m68k-softmmu.mak (100%)
 rename default-configs/{ => devices}/microblaze-softmmu.mak (100%)
 rename default-configs/{ => devices}/microblazeel-softmmu.mak (100%)
 rename default-configs/{ => devices}/mips-softmmu-common.mak (100%)
 rename default-configs/{ => devices}/mips-softmmu.mak (100%)
 rename default-configs/{ => devices}/mips64-softmmu.mak (100%)
 rename default-configs/{ => devices}/mips64el-softmmu.mak (100%)
 rename default-configs/{ => devices}/mipsel-softmmu.mak (100%)
 rename default-configs/{ => devices}/moxie-softmmu.mak (100%)
 rename default-configs/{ => devices}/nios2-softmmu.mak (100%)
 rename default-configs/{ => devices}/or1k-softmmu.mak (100%)
 rename default-configs/{ => devices}/ppc-softmmu.mak (100%)
 rename default-configs/{ => devices}/ppc64-softmmu.mak (100%)
 rename default-configs/{ => devices}/riscv32-softmmu.mak (100%)
 rename default-configs/{ => devices}/riscv64-softmmu.mak (100%)
 rename default-configs/{ => devices}/rx-softmmu.mak (100%)
 rename default-configs/{ => devices}/s390x-softmmu.mak (100%)
 rename default-configs/{ => devices}/sh4-softmmu.mak (100%)
 rename default-configs/{ => devices}/sh4eb-softmmu.mak (100%)
 rename default-configs/{ => devices}/sparc-softmmu.mak (100%)
 rename default-configs/{ => devices}/sparc64-softmmu.mak (100%)
 rename default-configs/{ => devices}/tricore-softmmu.mak (100%)
 rename default-configs/{ => devices}/unicore32-softmmu.mak (100%)
 rename default-configs/{ => devices}/x86_64-softmmu.mak (100%)
 rename default-configs/{ => devices}/xtensa-softmmu.mak (100%)
 rename default-configs/{ => devices}/xtensaeb-softmmu.mak (100%)
 delete mode 100644 default-configs/hppa-linux-user.mak
 delete mode 100644 default-configs/i386-bsd-user.mak
 delete mode 100644 default-configs/i386-linux-user.mak
 delete mode 100644 default-configs/m68k-linux-user.mak
 delete mode 100644 default-configs/microblaze-linux-user.mak
 delete mode 100644 default-configs/microblazeel-linux-user.mak
 delete mode 100644 default-configs/mips-linux-user.mak
 delete mode 100644 default-configs/mips64-linux-user.mak
 delete mode 100644 default-configs/mips64el-linux-user.mak
 delete mode 100644 default-configs/mipsel-linux-user.mak
 delete mode 100644 default-configs/mipsn32-linux-user.mak
 delete mode 100644 default-configs/mipsn32el-linux-user.mak
 delete mode 100644 default-configs/nios2-linux-user.mak
 delete mode 100644 default-configs/or1k-linux-user.mak
 delete mode 100644 default-configs/ppc-linux-user.mak
 delete mode 100644 default-configs/ppc64-linux-user.mak
 delete mode 100644 default-configs/ppc64abi32-linux-user.mak
 delete mode 100644 default-configs/ppc64le-linux-user.mak
 delete mode 100644 default-configs/riscv32-linux-user.mak
 delete mode 100644 default-configs/riscv64-linux-user.mak
 delete mode 100644 default-configs/s390x-linux-user.mak
 delete mode 100644 default-configs/sh4-linux-user.mak
 delete mode 100644 default-configs/sh4eb-linux-user.mak
 delete mode 100644 default-configs/sparc-bsd-user.mak
 delete mode 100644 default-configs/sparc-linux-user.mak
 delete mode 100644 default-configs/sparc32plus-linux-user.mak
 delete mode 100644 default-configs/sparc64-bsd-user.mak
 delete mode 100644 default-configs/sparc64-linux-user.mak
 create mode 100644 default-configs/targets/aarch64-linux-user.mak
 create mode 100644 default-configs/targets/aarch64-softmmu.mak
 create mode 100644 default-configs/targets/aarch64_be-linux-user.mak
 create mode 100644 default-configs/targets/alpha-linux-user.mak
 create mode 100644 default-configs/targets/alpha-softmmu.mak
 create mode 100644 default-configs/targets/arm-linux-user.mak
 create mode 100644 default-configs/targets/arm-softmmu.mak
 create mode 100644 default-configs/targets/armeb-linux-user.mak
 create mode 100644 default-configs/targets/avr-softmmu.mak
 create mode 100644 default-configs/targets/cris-linux-user.mak
 create mode 100644 default-configs/targets/cris-softmmu.mak
 create mode 100644 default-configs/targets/hppa-linux-user.mak
 create mode 100644 default-configs/targets/hppa-softmmu.mak
 create mode 100644 default-configs/targets/i386-bsd-user.mak
 create mode 100644 default-configs/targets/i386-linux-user.mak
 create mode 100644 default-configs/targets/i386-softmmu.mak
 create mode 100644 default-configs/targets/lm32-softmmu.mak
 create mode 100644 default-configs/targets/m68k-linux-user.mak
 create mode 100644 default-configs/targets/m68k-softmmu.mak
 create mode 100644 default-configs/targets/microblaze-linux-user.mak
 create mode 100644 default-configs/targets/microblaze-softmmu.mak
 create mode 100644 default-configs/targets/microblazeel-linux-user.mak
 create mode 100644 default-configs/targets/microblazeel-softmmu.mak
 create mode 100644 default-configs/targets/mips-linux-user.mak
 create mode 100644 default-configs/targets/mips-softmmu.mak
 create mode 100644 default-configs/targets/mips64-linux-user.mak
 create mode 100644 default-configs/targets/mips64-softmmu.mak
 create mode 100644 default-configs/targets/mips64el-linux-user.mak
 create mode 100644 default-configs/targets/mips64el-softmmu.mak
 create mode 100644 default-configs/targets/mipsel-linux-user.mak
 create mode 100644 default-configs/targets/mipsel-softmmu.mak
 create mode 100644 default-configs/targets/mipsn32-linux-user.mak
 create mode 100644 default-configs/targets/mipsn32el-linux-user.mak
 create mode 100644 default-configs/targets/moxie-softmmu.mak
 create mode 100644 default-configs/targets/nios2-linux-user.mak
 create mode 100644 default-configs/targets/nios2-softmmu.mak
 create mode 100644 default-configs/targets/or1k-linux-user.mak
 create mode 100644 default-configs/targets/or1k-softmmu.mak
 create mode 100644 default-configs/targets/ppc-linux-user.mak
 create mode 100644 default-configs/targets/ppc-softmmu.mak
 create mode 100644 default-configs/targets/ppc64-linux-user.mak
 create mode 100644 default-configs/targets/ppc64-softmmu.mak
 create mode 100644 default-configs/targets/ppc64abi32-linux-user.mak
 create mode 100644 default-configs/targets/ppc64le-linux-user.mak
 create mode 100644 default-configs/targets/riscv32-linux-user.mak
 create mode 100644 default-configs/targets/riscv32-softmmu.mak
 create mode 100644 default-configs/targets/riscv64-linux-user.mak
 create mode 100644 default-configs/targets/riscv64-softmmu.mak
 create mode 100644 default-configs/targets/rx-softmmu.mak
 create mode 100644 default-configs/targets/s390x-linux-user.mak
 create mode 100644 default-configs/targets/s390x-softmmu.mak
 create mode 100644 default-configs/targets/sh4-linux-user.mak
 create mode 100644 default-configs/targets/sh4-softmmu.mak
 create mode 100644 default-configs/targets/sh4eb-linux-user.mak
 create mode 100644 default-configs/targets/sh4eb-softmmu.mak
 create mode 100644 default-configs/targets/sparc-bsd-user.mak
 create mode 100644 default-configs/targets/sparc-linux-user.mak
 create mode 100644 default-configs/targets/sparc-softmmu.mak
 create mode 100644 default-configs/targets/sparc32plus-linux-user.mak
 create mode 100644 default-configs/targets/sparc64-bsd-user.mak
 create mode 100644 default-configs/targets/sparc64-linux-user.mak
 create mode 100644 default-configs/targets/sparc64-softmmu.mak
 create mode 100644 default-configs/targets/tilegx-linux-user.mak
 create mode 100644 default-configs/targets/tricore-softmmu.mak
 create mode 100644 default-configs/targets/unicore32-softmmu.mak
 create mode 100644 default-configs/targets/x86_64-bsd-user.mak
 create mode 100644 default-configs/targets/x86_64-linux-user.mak
 create mode 100644 default-configs/targets/x86_64-softmmu.mak
 create mode 100644 default-configs/targets/xtensa-linux-user.mak
 create mode 100644 default-configs/targets/xtensa-softmmu.mak
 create mode 100644 default-configs/targets/xtensaeb-linux-user.mak
 create mode 100644 default-configs/targets/xtensaeb-softmmu.mak
 delete mode 100644 default-configs/tilegx-linux-user.mak
 delete mode 100644 default-configs/x86_64-bsd-user.mak
 delete mode 100644 default-configs/x86_64-linux-user.mak
 delete mode 100644 default-configs/xtensa-linux-user.mak
 delete mode 100644 default-configs/xtensaeb-linux-user.mak