[Top][All Lists]

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

Re: [patch #8081] AX_PTHREAD.m4 not setting PTHREAD_LIBS to -pthread for

From: Al Pacifico
Subject: Re: [patch #8081] AX_PTHREAD.m4 not setting PTHREAD_LIBS to -pthread for gcc 4.7.2
Date: Wed, 19 Jun 2013 11:00:36 -0700

Forgive me if I am incorrect, but when I experimented with this, PTHREAD_LIBS seemed not to get set to anything at all by the macro compiling my code.

The macro documentation says it "sets the PTHREAD_LIBS output variable to the threads library and linker flags, and the PTHREAD_CFLAGS output variable to any special C compiler flags that are needed."


On Wed, Jun 19, 2013 at 9:16 AM, Daniel Richard G. <address@hidden> wrote:
Follow-up Comment #1, patch #8081 (project autoconf-archive):

As far as I could tell, the issue came down to not using PTHREAD_CFLAGS at
link time. This is why the comment on lines 21-23 of m4/ax_pthread.m4 is

Flags like -pthread need to be used at both the compile step and the link
step, and rather than duplicate these flags between PTHREAD_CFLAGS and
PTHREAD_LIBS, it makes more sense to keep them in PTHREAD_CFLAGS, have
PTHREAD_LIBS contain bits that are only needed at link time (like -lfoo
directives), and use both variables when linking.

(I don't rule out the possibility of there being an actual problem here, but I
haven't seen a clear indication of that yet.)


Reply to this item at:


  Message sent via/by Savannah

Al Pacifico
Seattle, WA

reply via email to

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