Re: [PATCH libevl] build: add initial RISC-V support

Tobias Schaffner <[email protected]> Wed, 8 Jul 2026 08:35:45 +0200
Newsgroups dev.linux.lists.xenomai
Message-ID <[email protected]>
Hi Philippe,

On 10/9/25 14:57, Tobias Schaffner wrote:
> From: shannmu <[email protected]>
> 
> Provide the basic build infrastructure and VDSO definitions
> required to build libevl on RISC-V.
> 
> Tested-by: Tobias Schaffner <[email protected]>
> Signed-off-by: Tobias Schaffner <[email protected]>

is this ready to get merged apart from a missing Signed-off-by by shanmu?

Best,
Tobias

> ---
>   lib/arch/riscv/include/asm/evl/vdso.h | 14 ++++++++++++++
>   meson.build                           |  4 ++++
>   meson/riscv64-linux-gnu               | 18 ++++++++++++++++++
>   3 files changed, 36 insertions(+)
>   create mode 100644 lib/arch/riscv/include/asm/evl/vdso.h
>   create mode 100644 meson/riscv64-linux-gnu
> 
> diff --git a/lib/arch/riscv/include/asm/evl/vdso.h b/lib/arch/riscv/include/asm/evl/vdso.h
> new file mode 100644
> index 0000000..5e331fb
> --- /dev/null
> +++ b/lib/arch/riscv/include/asm/evl/vdso.h
> @@ -0,0 +1,14 @@
> +/*
> + * SPDX-License-Identifier: MIT
> + *
> + * Copyright (C) 2021 Philippe Gerum  <[email protected]>
> + */
> +
> +#ifndef _LIB_EVL_RISCV_VDSO_H
> +#define _LIB_EVL_RISCV_VDSO_H
> +
> +#define __EVL_VDSO_KVERSION "LINUX_4.15"
> +
> +#define __EVL_VDSO_GETTIME "__vdso_clock_gettime"
> +
> +#endif /* !_LIB_EVL_RISCV_VDSO_H */
> diff --git a/meson.build b/meson.build
> index f241daf..038b2f0 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -57,6 +57,10 @@ if libevl_arch == 'aarch64'
>       libevl_arch = 'arm64'
>   endif
>   
> +if libevl_arch == 'riscv64'
> +    libevl_arch = 'riscv'
> +endif
> +
>   post_install = find_program('post-install.sh',
>       dirs : libevl_scripts,
>       required : true
> diff --git a/meson/riscv64-linux-gnu b/meson/riscv64-linux-gnu
> new file mode 100644
> index 0000000..6eb3b4e
> --- /dev/null
> +++ b/meson/riscv64-linux-gnu
> @@ -0,0 +1,18 @@
> +[binaries]
> +c = 'riscv64-linux-gnu-gcc'
> +cpp = 'riscv64-linux-gnu-g++'
> +ar = 'riscv64-linux-gnu-ar'
> +strip = 'riscv64-linux-gnu-strip'
> +pkg-config = 'pkg-config'
> +pcap-config = ''
> +
> +[host_machine]
> +system = 'linux'
> +cpu_family = 'riscv64'
> +cpu = 'riscv64'
> +endian = 'little'
> +
> +[properties]
> +platform = 'generic_riscv64'
> +sys_root = '/usr/riscv64-linux-gnu'
> +needs_exe_wrapper = false