diff mbox

jit: Fix missing references to pthread in jit-playback.c

Message ID CABOHX+dtCSRvjeRFg95w8VQ8+rPoDM1H6XaXJ9FDRtxjFFFsKA@mail.gmail.com
State New
Headers show

Commit Message

Iain Buclaw Jan. 23, 2016, 6:08 p.m. UTC
Hi,

I noticed when building from 2016-01-17 snapshot that the JIT frontend
failed to build.

---
jit-playback.c:2075:36: error: ‘PTHREAD_MUTEX_INITIALIZER’ was not
declared in this scope
jit-playback.c: In member function ‘void
gcc::jit::playback::context::acquire_mutex()’:
jit-playback.c:2086:33: error: ‘pthread_mutex_lock’ was not declared
in this scope
jit-playback.c: In member function ‘void
gcc::jit::playback::context::release_mutex()’:
jit-playback.c:2100:35: error: ‘pthread_mutex_unlock’ was not declared
in this scope
---

I'm not sure if this is something environmental on my side, or some
reorder/removals were done in the gcc headers included by the JIT
frontend, however this was needed in order to continue.

Regards
Iain.

Comments

David Malcolm Jan. 26, 2016, 12:33 a.m. UTC | #1
On Sat, 2016-01-23 at 19:08 +0100, Iain Buclaw wrote:
> Hi,
> 
> I noticed when building from 2016-01-17 snapshot that the JIT frontend
> failed to build.
> 
> ---
> jit-playback.c:2075:36: error: ‘PTHREAD_MUTEX_INITIALIZER’ was not
> declared in this scope
> jit-playback.c: In member function ‘void
> gcc::jit::playback::context::acquire_mutex()’:
> jit-playback.c:2086:33: error: ‘pthread_mutex_lock’ was not declared
> in this scope
> jit-playback.c: In member function ‘void
> gcc::jit::playback::context::release_mutex()’:
> jit-playback.c:2100:35: error: ‘pthread_mutex_unlock’ was not declared
> in this scope
> ---
> 
> I'm not sure if this is something environmental on my side, or some
> reorder/removals were done in the gcc headers included by the JIT
> frontend, however this was needed in order to continue.

Thanks.  Doko just reported the same issue, and I now see it (with
r232813) so this isn't just at your end.

OK for trunk.

Dave
Iain Buclaw Jan. 26, 2016, 8:56 a.m. UTC | #2
On 26 January 2016 at 01:33, David Malcolm <dmalcolm@redhat.com> wrote:
>
> On Sat, 2016-01-23 at 19:08 +0100, Iain Buclaw wrote:
> > Hi,
> >
> > I noticed when building from 2016-01-17 snapshot that the JIT frontend
> > failed to build.
> >
> > ---
> > jit-playback.c:2075:36: error: ‘PTHREAD_MUTEX_INITIALIZER’ was not
> > declared in this scope
> > jit-playback.c: In member function ‘void
> > gcc::jit::playback::context::acquire_mutex()’:
> > jit-playback.c:2086:33: error: ‘pthread_mutex_lock’ was not declared
> > in this scope
> > jit-playback.c: In member function ‘void
> > gcc::jit::playback::context::release_mutex()’:
> > jit-playback.c:2100:35: error: ‘pthread_mutex_unlock’ was not declared
> > in this scope
> > ---
> >
> > I'm not sure if this is something environmental on my side, or some
> > reorder/removals were done in the gcc headers included by the JIT
> > frontend, however this was needed in order to continue.
>
> Thanks.  Doko just reported the same issue, and I now see it (with
> r232813) so this isn't just at your end.
>
> OK for trunk.
>
> Dave
>

Thanks, I've committed this in.

Iain.
diff mbox

Patch

Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Sat Jan 23 18:59:44 2016 +0100

    gcc/jit/ChangeLog:
    	* jit-playback.c: Include pthread.h.

diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c
index d150ec1..579230d 100644
--- a/gcc/jit/jit-playback.c
+++ b/gcc/jit/jit-playback.c
@@ -38,6 +38,8 @@  along with GCC; see the file COPYING3.  If not see
 #include "fold-const.h"
 #include "gcc.h"
 
+#include <pthread.h>
+
 #include "jit-playback.h"
 #include "jit-result.h"
 #include "jit-builtins.h"