From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "beanhuo@micron.com" <beanhuo@micron.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"dgilbert@interlog.com" <dgilbert@interlog.com>
Cc: "hare@suse.de" <hare@suse.de>
Subject: Re: [RFC] sg3_utils: sgp_dd: work around on pthread_cancel for android
Date: Sat, 23 Dec 2017 13:29:51 +0000 [thread overview]
Message-ID: <1514035791.2965.3.camel@wdc.com> (raw)
In-Reply-To: <dcd86d371fd742c693eac4db5f9335f9@SIWEX5A.sing.micron.com>
On Sat, 2017-12-23 at 10:19 +0000, Bean Huo (beanhuo) wrote:
> Doug wrote:
> > This seems to work in Linux but may not work in Android:
> > AC_SEARCH_LIBS([pthread_cancel], [pthread],
> > [AC_DEFINE(HAVE_PTHREAD_CANCEL, 1, [Found pthread_cancel])], [])
> >
> > Bean, could you check?
> >
>
> Doug, I had tried that, it works, but this is for C codes macro definition in the config.h.
> How can I figure out in the /src/Makefile.ac between Android OS and non-Android?
> Can you give me some suggestions? Like this:
> if OS_ANDROID
> sgp_dd_LDADD = ../lib/libsgutils2.la @os_libs@
> else
> sgp_dd_LDADD = ../lib/libsgutils2.la @os_libs@ -lpthread
> endif
How about leaving out the following:
- Use AC_SEARCH_LIBS([pthread_cancel], [pthread]) and AC_CHECK_FUNC([pthread_cancel]) in
configure.ac.
- Use @LIBS@ in Makefile.am.
From https://www.gnu.org/software/autoconf/manual/autoconf-2.66/html_node/Libraries.html:
"If action-if-found is not specified, the default action prepends -llibrary to LIBS [...]".
Bart.
next prev parent reply other threads:[~2017-12-23 13:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-23 10:19 [RFC] sg3_utils: sgp_dd: work around on pthread_cancel for android Bean Huo (beanhuo)
2017-12-23 13:29 ` Bart Van Assche [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-12-26 22:21 Bean Huo (beanhuo)
2018-01-02 16:40 ` Bart Van Assche
2017-12-22 17:00 Bean Huo (beanhuo)
2017-12-22 18:24 ` Bart Van Assche
2017-12-23 0:43 ` Douglas Gilbert
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=1514035791.2965.3.camel@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=beanhuo@micron.com \
--cc=dgilbert@interlog.com \
--cc=hare@suse.de \
--cc=linux-scsi@vger.kernel.org \
/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