Skip to content

Commit

Permalink
meson: Introduce target-specific Kconfig
Browse files Browse the repository at this point in the history
Add a target-specific Kconfig. We need the definitions in Kconfig so
the minikconf tool can verify they exits. However CONFIG_FOO is only
enabled for target foo via the meson.build rules.

Two architecture have a particularity, ARM and MIPS. As their
translators have been split you can potentially build a plain 32 bit
build along with a 64-bit version including the 32-bit subset.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
philmd authored and bonzini committed Jul 9, 2021
1 parent 904ad5e commit f4063f9
Show file tree
Hide file tree
Showing 22 changed files with 80 additions and 1 deletion.
1 change: 1 addition & 0 deletions Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
source Kconfig.host
source backends/Kconfig
source accel/Kconfig
source target/Kconfig
source hw/Kconfig
source semihosting/Kconfig
3 changes: 2 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,8 @@ foreach target : target_dirs
command: [minikconf,
get_option('default_devices') ? '--defconfig' : '--allnoconfig',
config_devices_mak, '@DEPFILE@', '@INPUT@',
host_kconfig, accel_kconfig])
host_kconfig, accel_kconfig,
'CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y'])

config_devices_data = configuration_data()
config_devices = keyval.load(config_devices_mak)
Expand Down
19 changes: 19 additions & 0 deletions target/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
source alpha/Kconfig
source arm/Kconfig
source avr/Kconfig
source cris/Kconfig
source hppa/Kconfig
source i386/Kconfig
source m68k/Kconfig
source microblaze/Kconfig
source mips/Kconfig
source nios2/Kconfig
source openrisc/Kconfig
source ppc/Kconfig
source riscv/Kconfig
source rx/Kconfig
source s390x/Kconfig
source sh4/Kconfig
source sparc/Kconfig
source tricore/Kconfig
source xtensa/Kconfig
2 changes: 2 additions & 0 deletions target/alpha/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config ALPHA
bool
6 changes: 6 additions & 0 deletions target/arm/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
config ARM
bool

config AARCH64
bool
select ARM
2 changes: 2 additions & 0 deletions target/avr/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config AVR
bool
2 changes: 2 additions & 0 deletions target/cris/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config CRIS
bool
2 changes: 2 additions & 0 deletions target/hppa/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config HPPA
bool
5 changes: 5 additions & 0 deletions target/i386/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config I386
bool

config X86_64
bool
2 changes: 2 additions & 0 deletions target/m68k/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config M68K
bool
2 changes: 2 additions & 0 deletions target/microblaze/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config MICROBLAZE
bool
6 changes: 6 additions & 0 deletions target/mips/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
config MIPS
bool

config MIPS64
bool
select MIPS
2 changes: 2 additions & 0 deletions target/nios2/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config NIOS2
bool
2 changes: 2 additions & 0 deletions target/openrisc/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config OPENRISC
bool
5 changes: 5 additions & 0 deletions target/ppc/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config PPC
bool

config PPC64
bool
5 changes: 5 additions & 0 deletions target/riscv/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config RISCV32
bool

config RISCV64
bool
2 changes: 2 additions & 0 deletions target/rx/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config RX
bool
2 changes: 2 additions & 0 deletions target/s390x/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config S390X
bool
2 changes: 2 additions & 0 deletions target/sh4/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config SH4
bool
5 changes: 5 additions & 0 deletions target/sparc/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config SPARC
bool

config SPARC64
bool
2 changes: 2 additions & 0 deletions target/tricore/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config TRICORE
bool
2 changes: 2 additions & 0 deletions target/xtensa/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config XTENSA
bool

0 comments on commit f4063f9

Please sign in to comment.