This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] riscv: Use __has_include__ to include <asm/syscalls.h> [BZ #24022]
- From: Mark Corbin <mark dot corbin at embecosm dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 3 Jan 2019 11:59:50 +0000
- Subject: Re: [PATCH] riscv: Use __has_include__ to include <asm/syscalls.h> [BZ #24022]
- References: <20181221174840.10933-1-hjl.tools@gmail.com>
- Reply-to: mark dot corbin at embecosm dot com
On 21/12/2018 17:48, H.J. Lu wrote:
> ---
> sysdeps/unix/sysv/linux/riscv/flush-icache.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/sysdeps/unix/sysv/linux/riscv/flush-icache.c b/sysdeps/unix/sysv/linux/riscv/flush-icache.c
> index d612ef4c6c..d0ecec5107 100644
> --- a/sysdeps/unix/sysv/linux/riscv/flush-icache.c
> +++ b/sysdeps/unix/sysv/linux/riscv/flush-icache.c
> @@ -21,7 +21,11 @@
> #include <stdlib.h>
> #include <atomic.h>
> #include <sys/cachectl.h>
> +#if __has_include__ (<asm/syscalls.h>)
> #include <asm/syscalls.h>
> +#else
> +#include <asm/unistd.h>
> +#endif
>
> typedef int (*func_type) (void *, void *, unsigned long int);
>
Hello
I was wondering whether it would be possible for somebody to backport
this fix (commit id 0b9c84906f653978fb8768c7ebd0ee14a47e662e) from
master to the release/2.28/master branch.
The asm/syscalls.h file has been removed for RISC-V in the 4.20 kernel
and this is currently causing glibc build failures for the RISC-V
architecture under Buildroot (https://buildroot.org). I have a patch for
glibc in Buildroot, but it would be good to use the upstream release.
Many thanks
Mark
--
Mark Corbin
Embecosm Ltd.
https://www.embecosm.com