diff mbox series

[2/2] linux-user: Add QEMU include path to vdso

Message ID 20240726043246.10999-3-jim.shu@sifive.com (mailing list archive)
State New, archived
Headers show
Series Let gen-vdso tool to use internal ELF header | expand

Commit Message

Jim Shu July 26, 2024, 4:32 a.m. UTC
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(-)

Comments

Richard Henderson July 26, 2024, 5:32 a.m. UTC | #1
On 7/26/24 14:32, Jim Shu wrote:
> 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@'])
>   

Ok, I guess.  I'm not convinced we need this.  I tend to think our elf.h is way out of 
date, and perhaps should be removed.  I suspect we only carry it around now for windows 
hosts, compiling the system loaders.


r~
diff mbox series

Patch

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@'])