This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 06/22] Makefile.in: hack in -lpthread
- From: David Malcolm <dmalcolm at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: David Malcolm <dmalcolm at redhat dot com>
- Date: Fri, 4 Aug 2017 18:04:37 -0400
- Subject: [PATCH 06/22] Makefile.in: hack in -lpthread
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=dmalcolm at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 395B8A89C
- References: <1501884293-9047-1-git-send-email-dmalcolm@redhat.com>
The checker.cc patch later in the kit can optionally make use of pthread
if available.
Doing it properly would involve some configure checks; this patch simply
hacks in -lpthread into LIB unconditionally for now.
gcc/ChangeLog:
* Makefile.in (LIB): Hack in -lpthread.
---
gcc/Makefile.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 488f699..9ceb3f3 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1048,10 +1048,11 @@ LIBDEPS= libcommon.a $(CPPLIB) $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP) \
# even if we are cross-building GCC.
BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
+# FIXME: add some configury for pthread
# How to link with both our special library facilities
# and the system's installed libraries.
LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \
- $(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS)
+ $(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS) -lpthread
BACKENDLIBS = $(ISLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
$(ZLIB)
# Any system libraries needed just for GNAT.
--
1.8.5.3