Repository: trafficserver
Updated Branches:
  refs/heads/master ca7706fa5 -> bd34e40e8


TS-3308 Add an explicit -lpthread for gcc to build with ASAN options


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/bd34e40e
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/bd34e40e
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/bd34e40e

Branch: refs/heads/master
Commit: bd34e40e8c3d7b1dc96792fec7b433b99f70e1e3
Parents: ca7706f
Author: Leif Hedstrom <[email protected]>
Authored: Tue Jan 20 11:25:16 2015 -0700
Committer: Leif Hedstrom <[email protected]>
Committed: Tue Jan 20 11:25:16 2015 -0700

----------------------------------------------------------------------
 CHANGES                          | 3 +++
 cmd/traffic_crashlog/Makefile.am | 2 +-
 cmd/traffic_layout/Makefile.am   | 2 +-
 cmd/traffic_manager/Makefile.am  | 2 +-
 configure.ac                     | 6 +++---
 proxy/Makefile.am                | 9 +++++----
 6 files changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bd34e40e/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 6e00ea8..4631442 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.3.0
 
+  *) [TS-3308] We need an explicit -lpthread (when available) for ASAN
+   builds to succeed.
+
   *) [TS-3290] Add function to get origin server IP address in lua plugin.
 
   *) [TS-3304] Add NULL check to ink_inet_addr() input.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bd34e40e/cmd/traffic_crashlog/Makefile.am
----------------------------------------------------------------------
diff --git a/cmd/traffic_crashlog/Makefile.am b/cmd/traffic_crashlog/Makefile.am
index a51f1cd..fdb79f0 100644
--- a/cmd/traffic_crashlog/Makefile.am
+++ b/cmd/traffic_crashlog/Makefile.am
@@ -39,4 +39,4 @@ traffic_crashlog_LDADD = \
   $(top_builddir)/proxy/shared/libUglyLogStubs.a \
   $(top_builddir)/mgmt/api/libtsmgmt.la \
   $(top_builddir)/lib/ts/libtsutil.la \
-  @LIBTCL@ @HWLOC_LIBS@
+  @LIBTCL@ @HWLOC_LIBS@ @LIBPTHREAD@

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bd34e40e/cmd/traffic_layout/Makefile.am
----------------------------------------------------------------------
diff --git a/cmd/traffic_layout/Makefile.am b/cmd/traffic_layout/Makefile.am
index ea6d764..217a65a 100644
--- a/cmd/traffic_layout/Makefile.am
+++ b/cmd/traffic_layout/Makefile.am
@@ -35,4 +35,4 @@ traffic_layout_LDADD = \
   $(top_builddir)/iocore/eventsystem/libinkevent.a \
   $(top_builddir)/proxy/shared/libUglyLogStubs.a \
   $(top_builddir)/lib/ts/libtsutil.la \
-  @LIBTCL@ @HWLOC_LIBS@
+  @LIBTCL@ @HWLOC_LIBS@ @LIBPTHREAD@

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bd34e40e/cmd/traffic_manager/Makefile.am
----------------------------------------------------------------------
diff --git a/cmd/traffic_manager/Makefile.am b/cmd/traffic_manager/Makefile.am
index d7d953a..5c67e3f 100644
--- a/cmd/traffic_manager/Makefile.am
+++ b/cmd/traffic_manager/Makefile.am
@@ -55,7 +55,7 @@ traffic_manager_LDADD = \
   $(top_builddir)/proxy/shared/liberror.a \
   $(top_builddir)/proxy/shared/libdiagsconfig.a \
   $(LIBUNWIND_LIBS) \
-  @LIBRESOLV@ @LIBEXPAT@ @LIBPCRE@ @LIBTCL@ @LIBCAP@ @HWLOC_LIBS@ \
+  @LIBRESOLV@ @LIBEXPAT@ @LIBPCRE@ @LIBTCL@ @LIBCAP@ @HWLOC_LIBS@ @LIBPTHREAD@ 
\
   -lm
 
 # Must do it this way or the dependencies aren't detected.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bd34e40e/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 58515f3..c2e1c5c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1070,12 +1070,12 @@ AC_SEARCH_LIBS([MLD_demangle_string], [mld], [], [])
 AC_SEARCH_LIBS([dlopen], [dl], [], [])
 AC_SEARCH_LIBS([socket], [socket], [], [])
 AC_SEARCH_LIBS([gethostbyname], [nsl], [], [])
+AC_SEARCH_LIBS([clock_gettime], [rt], [], [])
+AC_SEARCH_LIBS([clock_gettime], [posix4], [], [])
 
 dnl Linux has pthread symbol stubss in both libc ad libpthread, so it's 
important to test
 dnl specifically for pthread_create() here.
-AC_SEARCH_LIBS([pthread_create], [pthread], [], [])
-AC_SEARCH_LIBS([clock_gettime], [rt], [], [])
-AC_SEARCH_LIBS([clock_gettime], [posix4], [], [])
+AC_SEARCH_LIBS([pthread_create], 
[pthread],[AC_SUBST([LIBPTHREAD],["-lpthread"])], [])
 
 dnl XXX The following check incorrectly causes the build to succeed
 dnl on Darwin. We should be using AC_SEARCH_LIBS, but rest_init is

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bd34e40e/proxy/Makefile.am
----------------------------------------------------------------------
diff --git a/proxy/Makefile.am b/proxy/Makefile.am
index a1a18a6..94220f1 100644
--- a/proxy/Makefile.am
+++ b/proxy/Makefile.am
@@ -229,6 +229,7 @@ traffic_server_LDADD = \
   @LIBLZMA@ \
   @LIBPROFILER@ \
   @SPDYLAY_LIBS@ \
+  @LIBPTHREAD@ \
   -lm
 
 if BUILD_LUAJIT
@@ -250,8 +251,8 @@ traffic_logcat_LDADD = \
   $(top_builddir)/lib/records/librecords_p.a \
   $(top_builddir)/iocore/eventsystem/libinkevent.a \
   $(top_builddir)/lib/ts/libtsutil.la \
-  @LIBRESOLV@ @LIBPCRE@ @OPENSSL_LIBS@ @LIBTCL@ @HWLOC_LIBS@ \
-  @LIBEXPAT@ @LIBPROFILER@ -lm
+  @LIBRESOLV@ @LIBPCRE@ @OPENSSL_LIBS@ @LIBTCL@ @HWLOC_LIBS@\
+  @LIBEXPAT@ @LIBPROFILER@ @LIBPTHREAD@ -lm
 
 traffic_logstats_SOURCES = logstats.cc
 traffic_logstats_LDFLAGS = @EXTRA_CXX_LDFLAGS@ @LIBTOOL_LINK_FLAGS@
@@ -265,7 +266,7 @@ traffic_logstats_LDADD = \
   $(top_builddir)/iocore/eventsystem/libinkevent.a \
   $(top_builddir)/lib/ts/libtsutil.la \
   @LIBRESOLV@ @LIBPCRE@ @OPENSSL_LIBS@ @LIBTCL@ @HWLOC_LIBS@ \
-  @LIBEXPAT@ @LIBPROFILER@ -lm
+  @LIBEXPAT@ @LIBPROFILER@ @LIBPTHREAD@ -lm
 
 traffic_sac_SOURCES = \
   sac.cc \
@@ -322,7 +323,7 @@ traffic_sac_LDADD = \
   $(top_builddir)/lib/records/librecords_p.a \
   $(top_builddir)/lib/ts/libtsutil.la \
   @LIBRESOLV@ @LIBPCRE@ @OPENSSL_LIBS@ @LIBTCL@ @HWLOC_LIBS@ \
-  @LIBEXPAT@ @LIBZ@ @LIBLZMA@ @LIBPROFILER@ @SPDYLAY_LIBS@ -lm
+  @LIBEXPAT@ @LIBZ@ @LIBLZMA@ @LIBPROFILER@ @SPDYLAY_LIBS@ @LIBPTHREAD@ -lm
 
 if BUILD_TESTS
   traffic_sac_SOURCES += RegressionSM.cc

Reply via email to