diff mbox series

[v4,6/9] linux-gen: stop poisoning CFLAGS/LDFLAGS with threading flags

Message ID 1498888823-4065-7-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v4,1/9] pkgconfig: provide minimal proper static linking flags | expand

Commit Message

Github ODP bot July 1, 2017, 6 a.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Instead of poisoning global AM_CFLAGS/AM_LDFLAGS with threading flags,
use fine-grained controls for compiling/linking with threading.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 45 (lumag:m4)
 ** https://github.com/Linaro/odp/pull/45
 ** Patch: https://github.com/Linaro/odp/pull/45.patch
 ** Base sha: ceeab69f3af67701adb524c7b9757d19cefb1110
 ** Merge commit sha: eee6b6add9a03184bf2f3198f07e983bb88c0e0a
 **/
 platform/Makefile.inc                    | 2 ++
 platform/linux-generic/Makefile.am       | 1 +
 platform/linux-generic/m4/odp_pthread.m4 | 5 -----
 3 files changed, 3 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 1903d92d..738f0f9a 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -16,6 +16,8 @@  AM_CFLAGS += $(VISIBILITY_CFLAGS)
 #The implementation will need to retain the deprecated implementation
 AM_CFLAGS += -Wno-deprecated-declarations
 
+AM_CFLAGS += @PTHREAD_CFLAGS@
+
 odpapispecincludedir= $(includedir)/odp/api/spec
 odpapispecinclude_HEADERS = \
 		  $(top_srcdir)/include/odp/api/spec/align.h \
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index a59d424f..4c23d136 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -259,6 +259,7 @@  endif
 __LIB__libodp_linux_la_LIBADD = $(ATOMIC_LIBS)
 __LIB__libodp_linux_la_LIBADD += $(OPENSSL_LIBS)
 __LIB__libodp_linux_la_LIBADD += $(DPDK_LIBS) $(DPDK_PMDS)
+__LIB__libodp_linux_la_LIBADD += $(PTHREAD_LIBS)
 
 if HAVE_PCAP
 __LIB__libodp_linux_la_LIBADD += $(PCAP_LIBS)
diff --git a/platform/linux-generic/m4/odp_pthread.m4 b/platform/linux-generic/m4/odp_pthread.m4
index 7f391039..48615894 100644
--- a/platform/linux-generic/m4/odp_pthread.m4
+++ b/platform/linux-generic/m4/odp_pthread.m4
@@ -6,8 +6,3 @@  AX_PTHREAD([CC="$PTHREAD_CC"], [
     echo "Error! We require pthreads to be available"
     exit -1
     ])
-LIBS="$PTHREAD_LIBS $LIBS"
-AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
-AM_LDFLAGS="$AM_LDFLAGS $PTHREAD_LDFLAGS"
-
-AM_LDFLAGS="$AM_LDFLAGS -pthread -lrt"