Android: do not link pthread on Android
authorCharles Briere <charlesbriere.flatzo@gmail.com>
Wed, 27 Nov 2013 15:48:30 +0000 (07:48 -0800)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 27 Nov 2013 16:23:39 +0000 (11:23 -0500)
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 <charlesbriere.flatzo@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Makefile.am
tests/benchmark/Makefile.am
tests/regression/Makefile.am
tests/unit/Makefile.am

index e09778febcda0d37710fd978bdaaa0abda51603e..581c00d186e757c905dd105eb5c2a1491cc0314d 100644 (file)
@@ -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
index e071034eff8b310dd5321aef4909c84d3242944c..bf021898a319bd511a5c2ae0235c43607ffbf007 100644 (file)
@@ -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 \
index 2c0542f95d2cf567f816a98baf15f3cf2dbfcd71..eb1569949d53a5ab29eb1b9491c4264141dba230 100644 (file)
@@ -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 \
index 1fa8b71f047fefd2417681efdac45882d88ec46d..2c89ca6d11c33a263081f7ed803c59eeb04bcbb5 100644 (file)
@@ -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 \
This page took 0.036149 seconds and 4 git commands to generate.