[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AX_PTHREAD incorrectly adds -pthread on OSX

From: Peter Simons
Subject: Re: AX_PTHREAD incorrectly adds -pthread on OSX
Date: Fri, 08 Jan 2016 19:56:34 +0100

I'm forwarding this message to Steven and Richard, the macro's authors.


Jason Gross <address@hidden> writes:

> The latest version of AX_PTHREAD (dd946914edb9da25e2d8c8b2186fab5d8103f3d4,
> serial 21) does not work on OS X. It tests for whether or not `clang -o
> conftest -g -O2 -pthread -Werror conftest.c` succeeds (which it does), when it
> actually needs to be checking for `clang -o conftest.o -g -O2 -pthread 
> -Werror -
> c conftest.c && clang -o conftest -g -O2 -pthread -Werror conftest.o` (which, 
> I
> believe, fails). If there's a variant of AC_LINK_IFELSE that does the
> compilation separately from the linking, then the change should be as simple 
> as
> # pthread_cleanup_push because it is one of the few pthread
> # functions on Solaris that doesn't have a non-functional libc stub.
> # We try pthread_create on general principles.
> - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
> static void routine(void *a) { a = 0; }
> static void *start_routine(void *a) { return a; }],
> [pthread_t th; pthread_attr_t attr;
> plus associated documentation and indentation changes, but I don't know if
> anything like AC_COMPILE_AND_LINK_SEPARATELY_IFELSE exists----does it?
> Thanks,
> Jason

reply via email to

[Prev in Thread] Current Thread [Next in Thread]