summary refs log tree commit diff
path: root/pkgs/development/compilers/gcc/7/riscv-pthread-reentrant.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/gcc/7/riscv-pthread-reentrant.patch')
-rw-r--r--pkgs/development/compilers/gcc/7/riscv-pthread-reentrant.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/development/compilers/gcc/7/riscv-pthread-reentrant.patch b/pkgs/development/compilers/gcc/7/riscv-pthread-reentrant.patch
new file mode 100644
index 00000000000..c7527ffb2b1
--- /dev/null
+++ b/pkgs/development/compilers/gcc/7/riscv-pthread-reentrant.patch
@@ -0,0 +1,13 @@
+Index: gcc/config/riscv/linux.h
+===================================================================
+--- a/gcc/config/riscv/linux.h	(revision 257620)
++++ b/gcc/config/riscv/linux.h	(revision 257621)
+@@ -47,6 +47,8 @@
+ 
+ #define ICACHE_FLUSH_FUNC "__riscv_flush_icache"
+ 
++#define CPP_SPEC "%{pthread:-D_REENTRANT}"
++
+ #define LINK_SPEC "\
+ -melf" XLEN_SPEC "lriscv \
+ %{shared} \