[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
time C++ tests: Fix link error on CentOS 5
From: |
Bruno Haible |
Subject: |
time C++ tests: Fix link error on CentOS 5 |
Date: |
Sat, 17 Sep 2022 21:34:42 +0200 |
Building a gnulib testdir on CentOS 5, I get this link error:
g++ -Wno-error -g -O2 -L/home/bruno/inst-x86_64-64/lib -o test-time-c++
test-time-c++.o test-time-c++2.o libtests.a ../gllib/libgnu.a libtests.a
../gllib/libgnu.a libtests.a -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm
../gllib/libgnu.a(gettime.o): In function `gettime':
/home/bruno/testdir-all/build-64/gllib/../../gllib/gettime.c:32: undefined
reference to `clock_gettime'
collect2: ld returned 1 exit status
make[4]: *** [test-time-c++] Error 1
This patch fixes it.
2022-09-17 Bruno Haible <bruno@clisp.org>
time C++ tests: Fix link error on CentOS 5.
* modules/time-c++-tests (Makefile.am): Link test-time-c++ against
$(LIB_CLOCK_GETTIME).
diff --git a/modules/time-c++-tests b/modules/time-c++-tests
index c811d6fd42..f8dd779965 100644
--- a/modules/time-c++-tests
+++ b/modules/time-c++-tests
@@ -16,5 +16,5 @@ if ANSICXX
TESTS += test-time-c++
check_PROGRAMS += test-time-c++
test_time_c___SOURCES = test-time-c++.cc test-time-c++2.cc
-test_time_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP)
+test_time_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP) $(LIB_CLOCK_GETTIME)
endif
- time C++ tests: Fix link error on CentOS 5,
Bruno Haible <=