<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Charles Brière" <charlesbriere.flatzo@gmail.com><br><b>To: </b>"Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>, "Mathieu Desnoyers" <mathieu.desnoyers@efficios.com><br><b>Cc: </b>lttng-dev@lists.lttng.org<br><b>Sent: </b>Friday, November 29, 2013 1:10:53 AM<br><b>Subject: </b>Re: [lttng-dev] [PATCH liburcu 2/5] Dont link pthread on Android<br><div><br></div><div dir="ltr">Dear Thomas, <div><br></div><div>To be honest, I haven't even though about other libc. But you are right, that is probably a better idea. </div><div><br></div><div>What about adding those lines to <a href="http://configure.ac" target="_blank" data-mce-href="http://configure.ac">configure.ac</a> ( modified from <a href="http://configure.ac" target="_blank" data-mce-href="http://configure.ac">configure.ac</a> found in lttng-tools ) </div><div><br></div><div># Check for pthread</div><div>AC_CHECK_LIB([pthread], [pthread_create],</div><div><span style="white-space:pre-wrap" data-mce-style="white-space: pre-wrap;"> </span>[AM_CONDITIONAL(LIBC_INCLUDES_PTHREAD, false)],</div><div><span style="white-space:pre-wrap" data-mce-style="white-space: pre-wrap;"> </span>[AC_CHECK_LIB([c], [pthread_create],</div><div><span style="white-space:pre-wrap" data-mce-style="white-space: pre-wrap;"> </span>[AM_CONDITIONAL(LIBC_INCLUDES_PTHREAD, true)],</div><div><span style="white-space:pre-wrap" data-mce-style="white-space: pre-wrap;"> </span>[AC_MSG_ERROR([Cannot find libpthread. Use [LDFLAGS]=-Ldir to specify its location.])]</div><div><span style="white-space:pre-wrap" data-mce-style="white-space: pre-wrap;"> </span>)]</div><div>)</div><div><br></div><div>and changing the if in the patch to "if !LIBC_INCLUDES_PTHREAD"</div><div><br></div><div><br></div><div>Thanks for the comment,</div><div>Charles</div><div><br></div><div><br></div><div><br></div><div>Mathieu, </div><div><br></div><div> if I am to submit a patch for that, should it be intended to replace this one, or on top of HEAD as a Fix ?</div></div></blockquote><div><br></div><div>Please submit against HEAD, as a fix, since the patch discussed here was already merged.<br></div><div><br></div><div>Thanks,<br></div><div><br></div><div>Mathieu<br></div><div><br></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><div dir="ltr"><div><br></div><div><br></div><div>Thanks,</div><div>Charles</div></div><div class="gmail_extra"><br><div><br></div><div class="gmail_quote">On Thu, Nov 28, 2013 at 1:30 AM, Thomas Petazzoni <span dir="ltr"><<a href="mailto:thomas.petazzoni@free-electrons.com" target="_blank" data-mce-href="mailto:thomas.petazzoni@free-electrons.com">thomas.petazzoni@free-electrons.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" data-mce-style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;">Dear Charles Briere,<br><div class="im"><br> On Wed, 27 Nov 2013 07:48:30 -0800, Charles Briere wrote:<br><br> > #Add the -version-info directly here since we are only building<br> > # library that use the version-info<br> > -AM_LDFLAGS=-lpthread -version-info $(URCU_LIBRARY_VERSION)<br> > +AM_LDFLAGS=-version-info $(URCU_LIBRARY_VERSION)<br> > +if !TARGET_IS_ANDROID<br> > +AM_LDFLAGS += -lpthread<br> > +endif<br><br></div>Instead of making that conditional on Android, wouldn't it make more<br> sense to make it conditional on whether linking with pthread is<br> necessary or not?<br><br> I can at least think of one other C library than Bionic that has<br> everything in libc instead of things split in several libraries: the<br> Musl C library (<a href="http://www.musl-libc.org" target="_blank" data-mce-href="http://www.musl-libc.org">http://www.musl-libc.org</a>).<br><br> Best regards,<br><br> Thomas<br><span class="HOEnZb"><span style="color: #888888;" data-mce-style="color: #888888;" color="#888888">--<br> Thomas Petazzoni, CTO, Free Electrons<br> Embedded Linux, Kernel and Android engineering<br> <a href="http://free-electrons.com" target="_blank" data-mce-href="http://free-electrons.com">http://free-electrons.com</a><br> </span></span></blockquote></div><br></div></blockquote><div><br><br></div><div><br></div><div>-- <br></div><div><span name="x"></span>Mathieu Desnoyers<br>EfficiOS Inc.<br>http://www.efficios.com<span name="x"></span><br></div></div></body></html>