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

Re: [Xen-devel] [PATCH 06/20] tools: Correct PTHREAD options in config/StdGNU.mk



Roger Pau Monné writes ("Re: [PATCH 06/20] tools: Correct PTHREAD options in 
config/StdGNU.mk"):
> 2012/3/16 Ian Jackson <ian.jackson@xxxxxxxxxxxxx>:
> > It is not correct to say -lpthread.  The correct option is -pthread,
> > which may have sundry other effects on code generation etc.  It needs
> > to be passed both to compilation and linking.
...
> Acked-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>

Thanks.

> > +        AC_LINK_IFELSE([
> > +#include <pthread.h>
> > +int main(void) {
> > +  pthread_atfork(0,0,0);
> > +  pthread_create(0,0,0,0);
> > +}
> 
> You can also use something like this here, which is more autoconf style:
> 
> AC_LANG_PROGRAM([#include <pthread.h>],[
>                 pthread_atfork(0,0,0);
>                 pthread_create(0,0,0,0);])
> 
> But as is looks correct to me, I'm not a big fan of autoconf macros.

Thanks for the comment.  I think I agree with your sentiment so I'll
leave this as it is.

> > +],[],[ax_cv_pthread_flags=failed])
> > +AC_DEFUN([AX_SAVEVAR_SAVE],[
> > +    saved_$1="$$1"
> > +])
> > +AC_DEFUN([AX_SAVEVAR_RESTORE],[
> > +    $1="$saved_$1"
> > +])
> 
> This little macros will prove useful on other places, such as
> python_devel.m4, that actually uses ac_previous_* to temporary store
> variables.

Right, that was the idea.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.