mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
meson: linux-user
The most interesting or most complicated part here is the syscall_nr.h generators. In order to keep the generation logic all in meson.build, I am adding to config_target the name of the .tbl file, and making the generated file syscall<SUFFIX>_nr.h for input file syscall<SUFFIX>.tbl. For architectures where the input file is not named syscall_nr.tbl, syscall_nr.h has to be a source file; it's just a forwarder for x86 (i386/x86_64), while for MIPS64 it chooses between N32 and N64 ABIs. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
1a82878a08
commit
3a30446aed
41 changed files with 166 additions and 132 deletions
|
@ -1,12 +0,0 @@
|
|||
generated-files-y += linux-user/$(TARGET_ABI_DIR)/syscall_nr.h
|
||||
|
||||
syshdr := $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscallhdr.sh
|
||||
|
||||
ifeq ($(TARGET_SYSTBL_ABI),n32)
|
||||
%/syscall_nr.h: $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscall_n32.tbl $(syshdr)
|
||||
$(call quiet-command, sh $(syshdr) $< $@ n32 "" 6000,"GEN","$@")
|
||||
endif
|
||||
ifeq ($(TARGET_SYSTBL_ABI),n64)
|
||||
%/syscall_nr.h: $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscall_n64.tbl $(syshdr)
|
||||
$(call quiet-command, sh $(syshdr) $< $@ n64 "" 5000,"GEN","$@")
|
||||
endif
|
6
linux-user/mips64/meson.build
Normal file
6
linux-user/mips64/meson.build
Normal file
|
@ -0,0 +1,6 @@
|
|||
syscall_nr_generators += {
|
||||
'mips64': generator(sh,
|
||||
arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@',
|
||||
'', 'TARGET_SYSCALL_OFFSET' ],
|
||||
output: '@BASENAME@_nr.h')
|
||||
}
|
7
linux-user/mips64/syscall_nr.h
Normal file
7
linux-user/mips64/syscall_nr.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
#ifdef TARGET_ABI_MIPSN32
|
||||
#define TARGET_SYSCALL_OFFSET 6000
|
||||
#include "syscall_n32_nr.h"
|
||||
#else
|
||||
#define TARGET_SYSCALL_OFFSET 5000
|
||||
#include "syscall_n64_nr.h"
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue