oauth: Always link with -lm for floor()
authorJacob Champion <jchampion@postgresql.org>
Mon, 25 Aug 2025 16:31:24 +0000 (09:31 -0700)
committerJacob Champion <jchampion@postgresql.org>
Mon, 25 Aug 2025 16:31:24 +0000 (09:31 -0700)
commite76738e597907d7cece10f67b0769b6d0b8d461e
tree8bc60be0727841311a784eb43dd3c399de9d33f6
parentc6dca7c3dd65d9f7b436db502338ac233a1c51fd
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
src/interfaces/libpq-oauth/Makefile