This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
linking to pthread - cross-compilation
- From: "Turgis, Frederic" <f-turgis at ti dot com>
- To: "systemtap at sourceware dot org" <systemtap at sourceware dot org>
- Cc: "Hunter, Jon" <jon-hunter at ti dot com>
- Date: Sun, 22 Apr 2012 18:24:13 +0000
- Subject: linking to pthread - cross-compilation
Hi,
Commit 26a3900666aab92afc99da19ecf0bba22224cede breaks our compilation of staprun. There is an "undefined reference" to pthread_mutex_lock.
This is because we are historically linking statically staprun in our cross-compilation process (OMAP + Android config) and "-lpthread" is needed and missing. pthread_mutex_lock() use does not require "-lpthread" when linking dynamically (I realized it tonight ;-) )
So I assume "-lpthread" should be added. I tested the 2 following solutions OK but don't know if this should be in runtime/staprun/configure or runtime/staprun/Makefile.am or Makefile.in (like existing stapio_LDADD=-lpthread). Probably more Makefile as this is not conditional.
I can provide a patch if I am guided to the right file (well, this looks small patch so you may prefer do it directly yourselves)
Regards
Fred
OMAP Platform Business Unit - System Platform Engineering - Platform & Product Entitlement
Texas Instruments France SA, 821 Avenue Jack Kilby, 06270 Villeneuve Loubet. 036 420 040 R.C.S Antibes. Capital de EUR 753.920