[Mesa-dev] [PATCH] threads: fix MinGW build breakage

Roland Scheidegger sroland at vmware.com
Thu Nov 9 22:49:36 UTC 2017


FWIW it looks like this series also broke compilation on mac os (I
suppose that was f0d3a4de75fdb865c058aba8614f0fe6ba5f0969 though):

[...truncated 173 lines...]
   pthread_barrier_destroy(barrier);
                           ^~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/pthread.h:220:42:
note: passing argument to parameter here
int pthread_attr_destroy(pthread_attr_t *);
                                         ^
In file included from src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:93:
In file included from src/gallium/auxiliary/os/os_thread.h:42:
src/util/u_thread.h:123:4: error: use of undeclared identifier
'pthread_barrier_wait'; did you mean 'util_barrier_wait'?
   pthread_barrier_wait(barrier);
   ^~~~~~~~~~~~~~~~~~~~
   util_barrier_wait
src/util/u_thread.h:121:20: note: 'util_barrier_wait' declared here
static inline void util_barrier_wait(util_barrier *barrier)
                   ^
5 errors generated.

Roland

Am 09.11.2017 um 23:37 schrieb Brian Paul:
> On 11/09/2017 02:41 PM, Nicolai Hähnle wrote:
>> Sorry for the mess.
> 
> Not a huge deal.  FWIW, you can test the MinGW cross-compile pretty easily:
> 
> 1. apt-get install g++-mingw-w64-x86-64 (or equivalent)
> 2. cd mesa ; scons platform=windows
> 
> -Brian
> 
>>
>> Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
>>
>> On 09.11.2017 17:46, Brian Paul wrote:
>>> Fixes: f1a364878431c8 ("threads: update for late C11 changes")
>>> ---
>>>   include/c11/threads_win32.h | 5 ++++-
>>>   1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/include/c11/threads_win32.h b/include/c11/threads_win32.h
>>> index 77d923a..dac8ef7 100644
>>> --- a/include/c11/threads_win32.h
>>> +++ b/include/c11/threads_win32.h
>>> @@ -78,6 +78,9 @@ Configuration macro:
>>>   /* Visual Studio 2015 and later */
>>>   #if _MSC_VER >= 1900
>>>   #define HAVE_TIMESPEC
>>> +#define HAVE_TIMESPEC_GET
>>> +#elif defined(__MINGW32__)
>>> +#define HAVE_TIMESPEC
>>>   #endif
>>>   #ifndef HAVE_TIMESPEC
>>> @@ -645,7 +648,7 @@ tss_set(tss_t key, void *val)
>>>   /*-------------------- 7.25.7 Time functions --------------------*/
>>>   // 7.25.6.1
>>> -#ifndef HAVE_TIMESPEC
>>> +#ifndef HAVE_TIMESPEC_GET
>>>   static inline int
>>>   timespec_get(struct timespec *ts, int base)
>>>   {
>>>
>>
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_mesa-2Ddev&d=DwIGaQ&c=uilaK90D4TOVoH58JNXRgQ&r=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0&m=m3uFZN2gUOf6Z-8JON9FReiHkx7t76arYWaon9_g7VQ&s=6ODsK1Y5jckR6EXRqz6AJFH2Uwl63iZSwrW6SBclRZo&e=
> 



More information about the mesa-dev mailing list