[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octave's m4/acx_pthread.m4 & OSX
From: |
Jarno Rajahalme |
Subject: |
Re: Octave's m4/acx_pthread.m4 & OSX |
Date: |
Tue, 7 Sep 2010 14:21:22 +0300 |
On Sep 7, 2010, at 3:30 , ext Ben Abbott wrote:
>
> I understand the patch is needed for MacOS 10.6, but what of the early
> versions?
>
> Thomas / anyone else, can you comment. Is the patch needed for ealier
> versions of MacOS?
>
> Also does anyone understand how the ACX_PTHREAD macro can be modified to
> detect the need for the -pthread option?
>
> For the details for why the patch is needed on MacOS 10.6, see the link below.
>
>
> https://www-old.cae.wisc.edu/pipermail/bug-octave/2010-January/010241.html
>
> Ben
>
>
The change is 10.6 is in /usr/include/architecture/i386/math.h:
/* lgamma and lgammaf are not thread-safe. The thread-safe variants
* lgamma_r and lgammaf_r are available on OS X 10.6 and later.
*
* To use the thread-safe variants, you must define the _REENTRANT symbol.
*/
The -pthread compiler option causes gcc to define the required _REENTRANT
symbol. I have not tested whether lgamma_r and lgammaf_r depend on any specific
threading libraries, but if they do the -pthread option should cause them to be
linked in.
OSX before 10.6 does not have the _r variants, but it seems to me that having
the -pthread option set should not break anything. Haven't tested it, though.
Jarno
- Octave's m4/acx_pthread.m4 & OSX, Jarno Rajahalme, 2010/09/06
- Re: Octave's m4/acx_pthread.m4 & OSX, Ben Abbott, 2010/09/06
- Re: Octave's m4/acx_pthread.m4 & OSX, Ben Abbott, 2010/09/06
- Re: Octave's m4/acx_pthread.m4 & OSX,
Jarno Rajahalme <=
- Re: Octave's m4/acx_pthread.m4 & OSX, Ben Abbott, 2010/09/07
- Re: Octave's m4/acx_pthread.m4 & OSX, John W. Eaton, 2010/09/07
- Re: Octave's m4/acx_pthread.m4 & OSX, Thomas Treichl, 2010/09/07
- Re: Octave's m4/acx_pthread.m4 & OSX, bpabbott, 2010/09/07
- Re: Octave's m4/acx_pthread.m4 & OSX, Thomas Treichl, 2010/09/07
- Re: Octave's m4/acx_pthread.m4 & OSX, bpabbott, 2010/09/07
- Re: Octave's m4/acx_pthread.m4 & OSX, bpabbott, 2010/09/07
- Re: Octave's m4/acx_pthread.m4 & OSX, John W. Eaton, 2010/09/07
- Re: Octave's m4/acx_pthread.m4 & OSX, bpabbott, 2010/09/07
- Re: Octave's m4/acx_pthread.m4 & OSX, Ben Abbott, 2010/09/07