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: Florian Weimer <fweimer at redhat dot com>
- To: Mark Corbin <mark dot corbin at embecosm dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, libc-alpha at sourceware dot org
- Date: Thu, 03 Jan 2019 14:51:33 +0100
- Subject: Re: [PATCH] riscv: Use __has_include__ to include <asm/syscalls.h> [BZ #24022]
- References: <20181221174840.10933-1-hjl.tools@gmail.com> <9da45e6f-0a7e-236e-e544-1a1e34454dd9@embecosm.com>
* Mark Corbin:
> 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.
I have now done so.
Thanks,
Florian