From 3a30446aed8497b5928576c6d1aedba557363934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Sun, 18 Aug 2019 16:13:08 +0400 Subject: meson: linux-user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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_nr.h for input file syscall.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 Signed-off-by: Paolo Bonzini --- linux-user/mips/Makefile.objs | 5 ----- linux-user/mips/meson.build | 6 ++++++ linux-user/mips/syscall_nr.h | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) delete mode 100644 linux-user/mips/Makefile.objs create mode 100644 linux-user/mips/meson.build create mode 100644 linux-user/mips/syscall_nr.h (limited to 'linux-user/mips') diff --git a/linux-user/mips/Makefile.objs b/linux-user/mips/Makefile.objs deleted file mode 100644 index 9be4de0..0000000 --- a/linux-user/mips/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -generated-files-y += linux-user/mips/syscall_nr.h - -syshdr := $(SRC_PATH)/linux-user/mips/syscallhdr.sh -%/syscall_nr.h: $(SRC_PATH)/linux-user/mips/syscall_o32.tbl $(syshdr) - $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI) "" 4000,"GEN","$@") diff --git a/linux-user/mips/meson.build b/linux-user/mips/meson.build new file mode 100644 index 0000000..262a357 --- /dev/null +++ b/linux-user/mips/meson.build @@ -0,0 +1,6 @@ +syscall_nr_generators += { + 'mips': generator(sh, + arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@', + '', '4000' ], + output: '@BASENAME@_nr.h') +} diff --git a/linux-user/mips/syscall_nr.h b/linux-user/mips/syscall_nr.h new file mode 100644 index 0000000..45d133c --- /dev/null +++ b/linux-user/mips/syscall_nr.h @@ -0,0 +1 @@ +#include "syscall_o32_nr.h" -- cgit v1.1