summaryrefslogtreecommitdiffstats
path: root/package/gcc/7.4.0/1001-gcc-define-_REENTRANT-for-RISC-V-when-pthread-is-pas.patch
diff options
context:
space:
mode:
authorRomain Naour <romain.naour@gmail.com>2018-12-08 16:37:34 +0100
committerPeter Korsgaard <peter@korsgaard.com>2018-12-08 20:53:01 +0100
commit92bab9a23c4008302ad8c5634b4daa658ce3d6ba (patch)
treeb7b6b5b316699a7eaf4ce843fb3c024d9c322235 /package/gcc/7.4.0/1001-gcc-define-_REENTRANT-for-RISC-V-when-pthread-is-pas.patch
parentfb0a46901c6f0146dc0dae41e8bee8300043cd2c (diff)
downloadbuildroot-92bab9a23c4008302ad8c5634b4daa658ce3d6ba.tar.gz
buildroot-92bab9a23c4008302ad8c5634b4daa658ce3d6ba.zip
package/gcc: bump to version 7.4.0
Remove upstream patches: 0002-fix-building-on-ppc64.patch https://github.com/gcc-mirror/gcc/commit/aa65a43516da1d48011ef621ed5988289711d99b 0003-gcc-xtensa-fix-NAND-code-in-xtensa_expand_atomic.patch https://github.com/gcc-mirror/gcc/commit/8709905244d50b9d81f85d534b21c29eb640078c 0003-xtensa-fix-PR-target-65416.patch https://github.com/gcc-mirror/gcc/commit/5dcbd70ec0a97505d6153fcbc7ef899b5a2ec7fc 0004-libsanitizer-Use-pre-computed-size.patch https://github.com/gcc-mirror/gcc/commit/61f38c64c01a15560026115a157b7021ec67bd3b 0005-gcc-xtensa-don-t-force-PIC-for-uclinux-target.patch https://github.com/gcc-mirror/gcc/commit/6ef0a00dea2564f46a568b8681d8efccb4834cda Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/gcc/7.4.0/1001-gcc-define-_REENTRANT-for-RISC-V-when-pthread-is-pas.patch')
-rw-r--r--package/gcc/7.4.0/1001-gcc-define-_REENTRANT-for-RISC-V-when-pthread-is-pas.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/package/gcc/7.4.0/1001-gcc-define-_REENTRANT-for-RISC-V-when-pthread-is-pas.patch b/package/gcc/7.4.0/1001-gcc-define-_REENTRANT-for-RISC-V-when-pthread-is-pas.patch
new file mode 100644
index 0000000000..accaf0214d
--- /dev/null
+++ b/package/gcc/7.4.0/1001-gcc-define-_REENTRANT-for-RISC-V-when-pthread-is-pas.patch
@@ -0,0 +1,31 @@
+From 6ea832d09415cd82b744d0cf168cdd728c43df47 Mon Sep 17 00:00:00 2001
+From: Mark Corbin <mark.corbin@embecosm.com>
+Date: Thu, 22 Nov 2018 12:19:11 +0000
+Subject: [PATCH] gcc: define _REENTRANT for RISC-V when -pthread is passed
+
+The detection of pthread support fails on RISC-V unless _REENTRANT
+is defined. Added the CPP_SPEC definition from gcc 8.1.0 to correct
+this.
+
+Signed-off-by: Mark Corbin <mark.corbin@embecosm.com>
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ gcc/config/riscv/linux.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
+index 4b2f7b6e1fd..b00d23ddfa0 100644
+--- a/gcc/config/riscv/linux.h
++++ b/gcc/config/riscv/linux.h
+@@ -47,6 +47,8 @@ along with GCC; see the file COPYING3. If not see
+
+ #define ICACHE_FLUSH_FUNC "__riscv_flush_icache"
+
++#define CPP_SPEC "%{pthread:-D_REENTRANT}"
++
+ #define LINK_SPEC "\
+ -melf" XLEN_SPEC "lriscv \
+ %{shared} \
+--
+2.19.1
+
OpenPOWER on IntegriCloud