Add include path to 'gen-vdso.c' to get ELF header in QEMU source.
Signed-off-by: Jim Shu <jim.shu@sifive.com>
---
linux-user/meson.build | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/linux-user/meson.build b/linux-user/meson.build
index bc41e8c3bc..ccce4f7e70 100644
--- a/linux-user/meson.build
+++ b/linux-user/meson.build
@@ -30,8 +30,11 @@ linux_user_ss.add(when: 'CONFIG_ARM_COMPATIBLE_SEMIHOSTING',
if_true: files('sem
syscall_nr_generators = {}
+# It requires "include/elf.h"
+gen_vdso_inc = include_directories('..' / 'include')
gen_vdso_exe = executable('gen-vdso', 'gen-vdso.c',
- native: true, build_by_default: false)
+ native: true, build_by_default: false,
+ include_directories: gen_vdso_inc)
gen_vdso = generator(gen_vdso_exe, output: '@BASENAME@.c.inc',
arguments: ['-o', '@OUTPUT@', '@EXTRA_ARGS@', '@INPUT@'])