2023-05-30 21:27:57 +02:00
|
|
|
From 48ced46a5f81f49737ea13d11a099e03062cf141 Mon Sep 17 00:00:00 2001
|
2022-01-18 23:24:24 +01:00
|
|
|
From: Bernd Kuhls <bernd.kuhls@t-online.de>
|
|
|
|
Date: Fri, 27 Mar 2020 21:23:53 +0100
|
|
|
|
Subject: [PATCH] gcc: define _REENTRANT for OpenRISC when -pthread is passed
|
|
|
|
|
|
|
|
The detection of pthread support fails on OpenRISC unless _REENTRANT
|
|
|
|
is defined. Added the CPP_SPEC definition to correct this.
|
|
|
|
|
|
|
|
Patch sent upstream: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94372
|
|
|
|
|
2023-05-30 21:27:57 +02:00
|
|
|
Upstream: cac2f69cdad434ad5cb60f5fe931d45cd82ef476
|
|
|
|
|
2022-01-18 23:24:24 +01:00
|
|
|
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
2023-05-30 21:27:57 +02:00
|
|
|
[Romain: add Upstream tag]
|
|
|
|
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
2022-01-18 23:24:24 +01:00
|
|
|
---
|
|
|
|
gcc/config/or1k/linux.h | 2 ++
|
|
|
|
1 file changed, 2 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/gcc/config/or1k/linux.h b/gcc/config/or1k/linux.h
|
2022-05-04 20:29:58 +02:00
|
|
|
index 196f3f3c8f0..0cbdc934af1 100644
|
2022-01-18 23:24:24 +01:00
|
|
|
--- a/gcc/config/or1k/linux.h
|
|
|
|
+++ b/gcc/config/or1k/linux.h
|
|
|
|
@@ -32,6 +32,8 @@
|
|
|
|
#undef MUSL_DYNAMIC_LINKER
|
|
|
|
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-or1k.so.1"
|
|
|
|
|
|
|
|
+#define CPP_SPEC "%{pthread:-D_REENTRANT}"
|
|
|
|
+
|
|
|
|
#undef LINK_SPEC
|
|
|
|
#define LINK_SPEC "%{h*} \
|
|
|
|
%{static:-Bstatic} \
|
|
|
|
--
|
2023-05-30 21:27:57 +02:00
|
|
|
2.34.3
|
2022-01-18 23:24:24 +01:00
|
|
|
|