From: charlesbriere.flatzo@gmail.com (Charles Brière)
Subject: [lttng-dev] [PATCH liburcu 2/5] Dont link pthread on Android
Date: Thu, 28 Nov 2013 16:10:53 -0800 [thread overview]
Message-ID: <CACnpWGTmYwjtmUCsiGHyS=nqSoQrO+_TMifPMvkwhYjxTOU06w@mail.gmail.com> (raw)
In-Reply-To: <20131128103024.3341ccc8@skate>
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.acfound 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 ?
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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20131128/23e098eb/attachment.html>
next prev parent reply other threads:[~2013-11-29 0:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-27 15:48 [lttng-dev] [PATCH liburcu 1/5] configure.ac Android check Charles Briere
2013-11-27 15:48 ` [lttng-dev] [PATCH liburcu 2/5] Dont link pthread on Android Charles Briere
2013-11-27 16:10 ` Mathieu Desnoyers
2013-11-28 9:30 ` Thomas Petazzoni
2013-11-29 0:10 ` Charles Brière [this message]
2013-11-29 6:01 ` Mathieu Desnoyers
2013-11-27 15:48 ` [lttng-dev] [PATCH liburcu 3/5] Added a compat layer for 'syscall.h' Charles Briere
2013-11-27 16:29 ` Mathieu Desnoyers
2013-11-27 17:20 ` Charles Brière
2013-11-27 17:38 ` Mathieu Desnoyers
2013-11-27 15:48 ` [lttng-dev] [PATCH liburcu 4/5] Fix: Do not redefine gettid on Android Charles Briere
2013-11-27 16:09 ` Mathieu Desnoyers
2013-11-27 15:48 ` [lttng-dev] [PATCH liburcu 5/5] Added implementation for rand_r() Charles Briere
-- strict thread matches above, loose matches on Subject: below --
2013-11-27 5:08 [lttng-dev] [PATCH liburcu 1/5] configure.ac Android check Charles Briere
2013-11-27 5:08 ` [lttng-dev] [PATCH liburcu 2/5] Dont link pthread on Android Charles Briere
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACnpWGTmYwjtmUCsiGHyS=nqSoQrO+_TMifPMvkwhYjxTOU06w@mail.gmail.com' \
--to=charlesbriere.flatzo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox