From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sat, 25 Jul 2015 20:37:12 +0000 (-0400)
Subject: Some platforms now need contrib/tsm_system_time to be linked with libm.
X-Git-Tag: REL9_6_BETA1~1644
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c879d51c5918ab5fc8feb9624aa4eae10ee93094;p=postgresql

Some platforms now need contrib/tsm_system_time to be linked with libm.

Buildfarm member hornet, at least, seems to want -lm in the link command.
Probably this is due to the just-added use of isnan().
---

diff --git a/contrib/tsm_system_time/Makefile b/contrib/tsm_system_time/Makefile
index 168becf54e..4c08a9935a 100644
--- a/contrib/tsm_system_time/Makefile
+++ b/contrib/tsm_system_time/Makefile
@@ -9,6 +9,8 @@ DATA = tsm_system_time--1.0.sql
 
 REGRESS = tsm_system_time
 
+SHLIB_LINK += $(filter -lm, $(LIBS))
+
 ifdef USE_PGXS
 PG_CONFIG = pg_config
 PGXS := $(shell $(PG_CONFIG) --pgxs)