Skip to contentSkip to conversation

Fix: configure.ac: check for possibly required libs for clock_gettime

PATCH Mathieu Desnoyers 2 participants 3 messages Feb 10, 2016 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Mathieu Desnoyers

author Applied
#1 lore raw

Hi,

Merged into urcu master, and stable-0.9 branches.

Please use [PATCH urcu] in the title next time for patches on lttng-dev. it makes it easier for us to know against which project the patch should be applied.

Thanks!

Mathieu

Quoted 46 lines · ----- On Feb 10, 2016, at 4:39 AM, Olof Johansson [email protected] wrote:

From: Olof Johansson <[email protected]>

On some platforms, you have to link with rt to get clock_gettime. This solves errors like:

undefined reference to `clock_gettime'

Fixes #996

---
configure.ac | 6 +++++-

1 file changed, 5 insertions(+), 1 deletion(-)
configure.ac +0 -0
index 39a7777..c3cf60e 100644
@@ -79,7 +79,6 @@ AC_FUNC_MMAP

AC_FUNC_FORK

AC_CHECK_FUNCS([ \
	atexit \
configure.ac +0 -1
-	clock_gettime \
	getcpuid \
	gettid \
	gettimeofday \
configure.ac +5 -1
@@ -215,6 +214,11 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
 	compat_futex_test=1
 ])
 
+# Search for clock_gettime
+AC_SEARCH_LIBS([clock_gettime], [rt], [],
+	[AC_MSG_ERROR([Cannot find clock_gettime function.])]
+)
+
 # Check for pthread
 AC_CHECK_LIB([pthread], [pthread_create],
 	[AM_CONDITIONAL(LIBC_INCLUDES_PTHREAD, false)],
--

2.1.4

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Signature · 3 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 7 lines · Mathieu Desnoyers

Hi,

Merged into urcu master, and stable-0.9 branches.

Please use [PATCH urcu] in the title next time for patches on lttng-dev. it makes it easier for us to know against which project the patch should be applied.

Thanks! (I thought I generated it with a [PATCH userspace-rcu] prefix, but must have regenerated the patch without the prefix set. Sorry about that.)

Signature · 1 line
olofjn

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 5 lines · ----- On Feb 10, 2016, at 8:39 AM, Olof Johansson [email protected] wrote:
Quoted 4 lines · Mathieu Desnoyers

Hi,

Merged into urcu master, and stable-0.9 branches.

Quoted 7 lines
Quoted 3 lines

Please use [PATCH urcu] in the title next time for patches on lttng-dev. it makes it easier for us to know against which project the patch should be applied.

Thanks! (I thought I generated it with a [PATCH userspace-rcu] prefix, but must have regenerated the patch without the prefix set. Sorry about that.)

No worries, thanks for the fix :)

Mathieu

Quoted 3 lines

--
olofjn

Signature · 3 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com