aboutsummaryrefslogtreecommitdiff
path: root/gold/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'gold/Makefile.am')
-rw-r--r--gold/Makefile.am6
1 files changed, 5 insertions, 1 deletions
diff --git a/gold/Makefile.am b/gold/Makefile.am
index 1c54986..d05979e 100644
--- a/gold/Makefile.am
+++ b/gold/Makefile.am
@@ -18,6 +18,10 @@ INCLUDES = -D_GNU_SOURCE \
LIBIBERTY = ../libiberty/libiberty.a
+if THREADS
+THREADSLIB = -lpthread
+endif
+
AM_YFLAGS = -d
noinst_PROGRAMS = ld-new
@@ -95,7 +99,7 @@ libgold_a_SOURCES = $(CCFILES) $(HFILES) $(YFILES)
sources_var = main.cc
deps_var = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(LIBINTL_DEP)
-ldadd_var = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(LIBINTL)
+ldadd_var = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(LIBINTL) $(THREADSLIB)
ld_new_SOURCES = $(sources_var)
ld_new_DEPENDENCIES = $(deps_var) $(LIBOBJS)