glibc/sysdeps
H.J. Lu 0b9c84906f riscv: Use __has_include__ to include <asm/syscalls.h> [BZ #24022]
<asm/syscalls.h> has been removed by

commit 27f8899d6002e11a6e2d995e29b8deab5aa9cc25
Author: David Abdurachmanov <david.abdurachmanov@gmail.com>
Date:   Thu Nov 8 20:02:39 2018 +0100

    riscv: add asm/unistd.h UAPI header

    Marcin Juszkiewicz reported issues while generating syscall table for riscv
    using 4.20-rc1. The patch refactors our unistd.h files to match some other
    architectures.

    - Add asm/unistd.h UAPI header, which has __ARCH_WANT_NEW_STAT only for 64-bit
    - Remove asm/syscalls.h UAPI header and merge to asm/unistd.h
    - Adjust kernel asm/unistd.h

    So now asm/unistd.h UAPI header should show all syscalls for riscv.

<asm/syscalls.h> may be restored by

Subject: [PATCH] riscv: restore asm/syscalls.h UAPI header
Date: Tue, 11 Dec 2018 09:09:35 +0100

UAPI header asm/syscalls.h was merged into UAPI asm/unistd.h header,
which did resolve issue with missing syscalls macros resulting in
glibc (2.28) build failure. It also broke glibc in a different way:
asm/syscalls.h is being used by glibc. I noticed this while doing
Fedora 30/Rawhide mass rebuild.

The patch returns asm/syscalls.h header and incl. it into asm/unistd.h.
I plan to send a patch to glibc to use asm/unistd.h instead of
asm/syscalls.h

In the meantime, we use __has_include__, which was added to GCC 5, to
check if <asm/syscalls.h> exists before including it.  Tested with
build-many-glibcs.py for riscv against kernel 4.19.12 and 4.20-rc7.

	[BZ #24022]
	* sysdeps/unix/sysv/linux/riscv/flush-icache.c: Check if
	<asm/syscalls.h> exists with __has_include__ before including it.
2018-12-31 09:26:56 -08:00
..
aarch64 [AArch64] Adjust writeback in non-zero memset 2018-11-20 12:37:00 +00:00
alpha Update Alpha libm-test-ulps 2018-12-28 10:50:00 +01:00
arm Fix armv7 build with GCC 9. 2018-11-12 23:59:29 +00:00
csky Add C-SKY port 2018-12-21 09:48:04 +08:00
generic Use PRINTF_LDBL_IS_DBL instead of __ldbl_is_dbl. 2018-12-05 18:15:43 -02:00
gnu hurd: Fix build 2018-10-31 09:17:05 +01:00
hppa Move SNAN_TESTS_PRESERVE_PAYLOAD out of math-tests.h. 2018-08-01 11:21:16 +00:00
htl htl: Fix comparing attr with default values 2018-12-01 21:42:12 +01:00
hurd Fix ISO C threads installed header and HURD assumption 2018-07-25 17:27:45 -03:00
i386 x86: Merge i386/x86_64 atomic-machine.h 2018-12-18 04:25:26 -08:00
ia64 Remove the error handling wrapper from pow 2018-11-21 09:58:36 +00:00
ieee754 x86-64: Vectorize sincosf_poly and update s_sincosf-fma.c 2018-12-26 06:56:13 -08:00
init_array sysdeps/init_array: Add PREINIT_FUNCTION to crti.S 2018-01-29 10:22:26 -08:00
m68k Remove the error handling wrapper from pow 2018-11-21 09:58:36 +00:00
mach hurd: Fix 64bit fcntl lock implementation 2018-12-19 02:17:22 +01:00
microblaze Mark _init and _fini as hidden [BZ #23145] 2018-06-08 10:28:52 -07:00
mips Fix mips build with GCC 9. 2018-11-13 01:55:15 +00:00
nios2 Move EXCEPTION_TESTS_* out of math-tests.h 2018-08-23 23:41:13 +00:00
nptl Use PRINTF_FORTIFY instead of _IO_FLAGS2_FORTIFY (bug 11319) 2018-12-05 18:15:43 -02:00
posix timespec_get (posix): Fix copyright header 2018-12-12 17:13:17 +01:00
powerpc Print cache size and geometry auxv types on LD_SHOW_AUXV=1 2018-12-19 19:08:02 -02:00
pthread hurd: fix sigevent's sigev_notify_attributes field type 2018-04-19 21:43:44 +02:00
riscv RISC-V: properly terminate call chain (bug 23125) 2018-10-30 12:07:25 +01:00
s390 S390: Cleanup ifunc-resolve.h. 2018-12-18 13:57:25 +01:00
sh Update SH libm-tests-ulps 2018-07-31 10:33:53 -03:00
sparc Fix sparc64 build with GCC 9. 2018-11-13 00:27:06 +00:00
unix riscv: Use __has_include__ to include <asm/syscalls.h> [BZ #24022] 2018-12-31 09:26:56 -08:00
wordsize-32 Use libc_hidden_* for strtoumax (bug 15105). 2018-02-28 14:16:21 +00:00
wordsize-64 Don't reduce test timeout to less than default 2018-10-17 09:34:13 +02:00
x86 x86-64: Vectorize sincosf_poly and update s_sincosf-fma.c 2018-12-26 06:56:13 -08:00
x86_64 x86-64: Remove s_sincosf-sse2.S 2018-12-26 06:58:31 -08:00