[lttng-dev] [PATCH liburcu 2/5] Dont link pthread on Android
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Fri Nov 29 01:01:28 EST 2013
----- Original Message -----
> From: "Charles Brière" <charlesbriere.flatzo at gmail.com>
> To: "Thomas Petazzoni" <thomas.petazzoni at free-electrons.com>, "Mathieu
> Desnoyers" <mathieu.desnoyers at efficios.com>
> Cc: lttng-dev at lists.lttng.org
> Sent: Friday, November 29, 2013 1:10:53 AM
> Subject: Re: [lttng-dev] [PATCH liburcu 2/5] Dont link pthread on Android
> Dear Thomas,
> To be honest, I haven't even though about other libc. But you are right, that
> is probably a better idea.
> What about adding those lines to configure.ac ( modified from configure.ac
> found in lttng-tools )
> # Check for pthread
> AC_CHECK_LIB([pthread], [pthread_create],
> [AM_CONDITIONAL(LIBC_INCLUDES_PTHREAD, false)],
> [AC_CHECK_LIB([c], [pthread_create],
> [AM_CONDITIONAL(LIBC_INCLUDES_PTHREAD, true)],
> [AC_MSG_ERROR([Cannot find libpthread. Use [LDFLAGS]=-Ldir to specify its
> location.])]
> )]
> )
> and changing the if in the patch to "if !LIBC_INCLUDES_PTHREAD"
> Thanks for the comment,
> Charles
> Mathieu,
> 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 ?
Please submit against HEAD, as a fix, since the patch discussed here was already merged.
Thanks,
Mathieu
> Thanks,
> Charles
> On Thu, Nov 28, 2013 at 1:30 AM, Thomas Petazzoni <
> thomas.petazzoni at free-electrons.com > wrote:
> > Dear Charles Briere,
>
> > On Wed, 27 Nov 2013 07:48:30 -0800, Charles Briere wrote:
>
> > > #Add the -version-info directly here since we are only building
>
> > > # library that use the version-info
>
> > > -AM_LDFLAGS=-lpthread -version-info $(URCU_LIBRARY_VERSION)
>
> > > +AM_LDFLAGS=-version-info $(URCU_LIBRARY_VERSION)
>
> > > +if !TARGET_IS_ANDROID
>
> > > +AM_LDFLAGS += -lpthread
>
> > > +endif
>
> > Instead of making that conditional on Android, wouldn't it make more
>
> > sense to make it conditional on whether linking with pthread is
>
> > necessary or not?
>
> > I can at least think of one other C library than Bionic that has
>
> > everything in libc instead of things split in several libraries: the
>
> > Musl C library ( http://www.musl-libc.org ).
>
> > Best regards,
>
> > Thomas
>
> > --
>
> > Thomas Petazzoni, CTO, Free Electrons
>
> > Embedded Linux, Kernel and Android engineering
>
> > http://free-electrons.com
>
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20131129/d9c52d18/attachment-0001.html>
More information about the lttng-dev
mailing list