summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Champion <jchampion@postgresql.org>2025-08-25 09:27:39 -0700
committerJacob Champion <jchampion@postgresql.org>2025-08-25 09:27:39 -0700
commit52ecd05aeef851b7d3688b0f0a633132c691eb32 (patch)
tree25ef0f9180d584942e3b61f6c72fe9209491495c
parent3ef2b863a376af35e8d5f2cd1bb4311ec7a9f299 (diff)
oauth: Always link with -lm for floor()
libpq-oauth uses floor() but did not link against libm. Since libpq itself uses -lm, nothing in the buildfarm has had problems with libpq-oauth yet, and it seems difficult to hit a failure in practice. But commit 1443b6c0e attempted to add an executable based on libpq-oauth, which ran into link-time failures with Clang due to this omission. It seems prudent to fix this for both the module and the executable simultaneously so that no one trips over it in the future. This is a Makefile-only change. The Meson side already pulls in libm, through the os_deps dependency. Discussion: https://postgr.es/m/CAOYmi%2Bn6ORcmV10k%2BdAs%2Bp0b9QJ4bfpk0WuHQaF5ODXxM8Y36A%40mail.gmail.com Backpatch-through: 18
-rw-r--r--src/interfaces/libpq-oauth/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/libpq-oauth/Makefile b/src/interfaces/libpq-oauth/Makefile
index 682f17413b3..8819fa8650e 100644
--- a/src/interfaces/libpq-oauth/Makefile
+++ b/src/interfaces/libpq-oauth/Makefile
@@ -47,7 +47,7 @@ $(stlib): override OBJS += $(OBJS_STATIC)
$(stlib): $(OBJS_STATIC)
SHLIB_LINK_INTERNAL = $(libpq_pgport_shlib)
-SHLIB_LINK = $(LIBCURL_LDFLAGS) $(LIBCURL_LDLIBS) $(filter -lintl, $(LIBS))
+SHLIB_LINK = $(LIBCURL_LDFLAGS) $(LIBCURL_LDLIBS) $(filter -lintl -lm, $(LIBS))
SHLIB_PREREQS = submake-libpq
SHLIB_EXPORTS = exports.txt