2022-01-17 20:12:29 +00:00
|
|
|
From cad142fc0fa5fa52c886ad8807cc62b34e5f1540 Mon Sep 17 00:00:00 2001
|
2021-11-29 07:07:20 +00:00
|
|
|
From: Alex McGrath <amk@amk.ie>
|
|
|
|
Date: Wed, 13 Oct 2021 23:24:27 +0100
|
|
|
|
Subject: [PATCH] Fix attempt to use poisoned calloc error in libgccjit
|
|
|
|
|
|
|
|
This moves usages of pthread.h to above any usage of system.h as it
|
|
|
|
included #pragma GCC poison calloc
|
|
|
|
---
|
|
|
|
gcc/jit/jit-playback.c | 4 ++--
|
|
|
|
gcc/jit/jit-recording.c | 4 ++--
|
|
|
|
gcc/jit/libgccjit.c | 3 ++-
|
|
|
|
3 files changed, 6 insertions(+), 5 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c
|
2022-01-06 15:11:38 +00:00
|
|
|
index cee9daa8220..a5600084933 100644
|
2021-11-29 07:07:20 +00:00
|
|
|
--- a/gcc/jit/jit-playback.c
|
|
|
|
+++ b/gcc/jit/jit-playback.c
|
|
|
|
@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
|
|
|
|
along with GCC; see the file COPYING3. If not see
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
|
|
|
|
|
|
|
+#include <pthread.h>
|
|
|
|
+
|
|
|
|
#include "config.h"
|
|
|
|
#include "system.h"
|
|
|
|
#include "coretypes.h"
|
|
|
|
@@ -41,8 +43,6 @@ along with GCC; see the file COPYING3. If not see
|
|
|
|
#include "diagnostic.h"
|
|
|
|
#include "stmt.h"
|
|
|
|
|
|
|
|
-#include <pthread.h>
|
|
|
|
-
|
|
|
|
#include "jit-playback.h"
|
|
|
|
#include "jit-result.h"
|
|
|
|
#include "jit-builtins.h"
|
|
|
|
diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c
|
|
|
|
index 117ff70114c..d2634a546b1 100644
|
|
|
|
--- a/gcc/jit/jit-recording.c
|
|
|
|
+++ b/gcc/jit/jit-recording.c
|
|
|
|
@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
|
|
|
|
along with GCC; see the file COPYING3. If not see
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
|
|
|
|
|
|
|
+#include <pthread.h>
|
|
|
|
+
|
|
|
|
#include "config.h"
|
|
|
|
#include "system.h"
|
|
|
|
#include "coretypes.h"
|
|
|
|
@@ -25,8 +27,6 @@ along with GCC; see the file COPYING3. If not see
|
|
|
|
#include "pretty-print.h"
|
|
|
|
#include "toplev.h"
|
|
|
|
|
|
|
|
-#include <pthread.h>
|
|
|
|
-
|
|
|
|
#include "jit-builtins.h"
|
|
|
|
#include "jit-recording.h"
|
|
|
|
#include "jit-playback.h"
|
|
|
|
diff --git a/gcc/jit/libgccjit.c b/gcc/jit/libgccjit.c
|
|
|
|
index 0cc650f9810..2f44481eeb0 100644
|
|
|
|
--- a/gcc/jit/libgccjit.c
|
|
|
|
+++ b/gcc/jit/libgccjit.c
|
|
|
|
@@ -18,13 +18,14 @@ You should have received a copy of the GNU General Public License
|
|
|
|
along with GCC; see the file COPYING3. If not see
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
|
|
|
|
|
|
|
+#include <pthread.h>
|
|
|
|
+
|
|
|
|
#include "config.h"
|
|
|
|
#include "system.h"
|
|
|
|
#include "coretypes.h"
|
|
|
|
#include "timevar.h"
|
|
|
|
#include "typed-splay-tree.h"
|
|
|
|
#include "cppbuiltin.h"
|
|
|
|
-#include <pthread.h>
|
|
|
|
|
|
|
|
#include "libgccjit.h"
|
|
|
|
#include "jit-recording.h"
|
|
|
|
--
|
2022-01-06 15:11:38 +00:00
|
|
|
2.34.1
|
2021-11-29 07:07:20 +00:00
|
|
|
|