RISC-V: Add upstream gcc patch to fix -pthread.

Fixes libmicrohttpd build.

+16 -1
+3 -1
pkgs/development/compilers/gcc/7/default.nix
··· 73 73 # The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its 74 74 # target libraries and tools. 75 75 ++ optional langAda ../gnat-cflags.patch 76 - ++ optional langFortran ../gfortran-driving.patch; 76 + ++ optional langFortran ../gfortran-driving.patch 77 + # https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00633.html 78 + ++ optional targetPlatform.isRiscV ./riscv-pthread-reentrant.patch; 77 79 78 80 javaEcj = fetchurl { 79 81 # The `$(top_srcdir)/ecj.jar' file is automatically picked up at
+13
pkgs/development/compilers/gcc/7/riscv-pthread-reentrant.patch
··· 1 + Index: gcc/config/riscv/linux.h 2 + =================================================================== 3 + --- a/gcc/config/riscv/linux.h (revision 257620) 4 + +++ b/gcc/config/riscv/linux.h (revision 257621) 5 + @@ -47,6 +47,8 @@ 6 + 7 + #define ICACHE_FLUSH_FUNC "__riscv_flush_icache" 8 + 9 + +#define CPP_SPEC "%{pthread:-D_REENTRANT}" 10 + + 11 + #define LINK_SPEC "\ 12 + -melf" XLEN_SPEC "lriscv \ 13 + %{shared} \