From: Charles Briere Date: Wed, 27 Nov 2013 15:48:30 +0000 (-0800) Subject: Android: do not link pthread on Android X-Git-Tag: v0.9.0~126 X-Git-Url: https://git.lttng.org/?p=urcu.git;a=commitdiff_plain;h=58a052effb2305655ff1b7233c78ab24fc25257e Android: do not link pthread on Android On Android, pthread is already part of libc called Bionic and doesn't have an external library to link with. Signed-off-by: Charles Briere Signed-off-by: Mathieu Desnoyers --- diff --git a/Makefile.am b/Makefile.am index e09778f..581c00d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,10 @@ INCLUDES = -I$(top_builddir)/urcu #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 AM_CFLAGS=-Wall SUBDIRS = . doc tests diff --git a/tests/benchmark/Makefile.am b/tests/benchmark/Makefile.am index e071034..bf02189 100644 --- a/tests/benchmark/Makefile.am +++ b/tests/benchmark/Makefile.am @@ -1,4 +1,6 @@ +if !TARGET_IS_ANDROID AM_LDFLAGS=-lpthread +endif AM_CFLAGS=-I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/tests/common -g noinst_PROGRAMS = test_urcu test_urcu_dynamic_link test_urcu_timing \ diff --git a/tests/regression/Makefile.am b/tests/regression/Makefile.am index 2c0542f..eb15699 100644 --- a/tests/regression/Makefile.am +++ b/tests/regression/Makefile.am @@ -1,4 +1,6 @@ +if !TARGET_IS_ANDROID AM_LDFLAGS=-lpthread +endif AM_CFLAGS=-I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/tests/common -g noinst_PROGRAMS = test_urcu_fork \ diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index 1fa8b71..2c89ca6 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -1,4 +1,6 @@ +if !TARGET_IS_ANDROID AM_LDFLAGS=-lpthread +endif AM_CFLAGS=-I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/tests/common -g noinst_PROGRAMS = test_uatomic \