mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 23:07:59 +01:00
guix: adjust RISC-V __has_include() patch to work with GCC 10
The actual macro is __has_include(), not __has_include__(), using the later would result in build failures when using GCC 10. i.e: ```bash ../sysdeps/unix/sysv/linux/riscv/flush-icache.c:24:5: warning: "__has_include__" is not defined, evaluates to 0 [-Wundef] 24 | #if __has_include__ (<asm/syscalls.h>) ``` Looks like at least someone else has run into the same thing, see: http://lists.busybox.net/pipermail/buildroot/2020-July/590376.html. See also: https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005finclude.html https://clang.llvm.org/docs/LanguageExtensions.html#has-include
This commit is contained in:
parent
c9c5b3060d
commit
508bd4d357
2 changed files with 6 additions and 2 deletions
|
@ -553,7 +553,7 @@ inspecting signatures in Mach-O binaries.")
|
||||||
(base32
|
(base32
|
||||||
"1b2n1gxv9f4fd5yy68qjbnarhf8mf4vmlxk10i3328c1w5pmp0ca"))
|
"1b2n1gxv9f4fd5yy68qjbnarhf8mf4vmlxk10i3328c1w5pmp0ca"))
|
||||||
(patches (search-our-patches "glibc-ldd-x86_64.patch"
|
(patches (search-our-patches "glibc-ldd-x86_64.patch"
|
||||||
"glibc-2.27-riscv64-Use-__has_include__-to-include-asm-syscalls.h.patch"))))))
|
"glibc-2.27-riscv64-Use-__has_include-to-include-asm-syscalls.h.patch"))))))
|
||||||
|
|
||||||
(packages->manifest
|
(packages->manifest
|
||||||
(append
|
(append
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
Note that this has been modified from the original commit, to use __has_include
|
||||||
|
instead of __has_include__, as the later was causing build failures with GCC 10.
|
||||||
|
See also: http://lists.busybox.net/pipermail/buildroot/2020-July/590376.html.
|
||||||
|
|
||||||
https://sourceware.org/git/?p=glibc.git;a=commit;h=0b9c84906f653978fb8768c7ebd0ee14a47e662e
|
https://sourceware.org/git/?p=glibc.git;a=commit;h=0b9c84906f653978fb8768c7ebd0ee14a47e662e
|
||||||
|
|
||||||
From 562c52cc81a4e456a62e6455feb32732049e9070 Mon Sep 17 00:00:00 2001
|
From 562c52cc81a4e456a62e6455feb32732049e9070 Mon Sep 17 00:00:00 2001
|
||||||
|
@ -59,7 +63,7 @@ index d612ef4c6c..0b2042620b 100644
|
||||||
#include <atomic.h>
|
#include <atomic.h>
|
||||||
#include <sys/cachectl.h>
|
#include <sys/cachectl.h>
|
||||||
-#include <asm/syscalls.h>
|
-#include <asm/syscalls.h>
|
||||||
+#if __has_include__ (<asm/syscalls.h>)
|
+#if __has_include (<asm/syscalls.h>)
|
||||||
+# include <asm/syscalls.h>
|
+# include <asm/syscalls.h>
|
||||||
+#else
|
+#else
|
||||||
+# include <asm/unistd.h>
|
+# include <asm/unistd.h>
|
Loading…
Add table
Reference in a new issue