From 55a6814dd32978e88c5be7f023ac9d88d6287b59 Mon Sep 17 00:00:00 2001 From: Alex McGrath 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 index cee9daa8220..a5600084933 100644 --- 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 . */ +#include + #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 - #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 . */ +#include + #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 - #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 . */ +#include + #include "config.h" #include "system.h" #include "coretypes.h" #include "timevar.h" #include "typed-splay-tree.h" #include "cppbuiltin.h" -#include #include "libgccjit.h" #include "jit-recording.h" -- 2.34.1