diff mbox series

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

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

Commit Message

Github ODP bot June 30, 2017, 11 p.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: bc5ee5a9b895a630b180cd264a55c8e4817de750
 **/
 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 3d9bba69..e81057e5 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -260,6 +260,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)
 
 # Create symlink for ABI header files. Application does not need to use the arch
 # specific include path for installed files.
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"