diff mbox series

[1/1] package/apr: link with -lm

Message ID 20251005123246.1165560-1-bernd@kuhls.net
State New
Headers show
Series [1/1] package/apr: link with -lm | expand

Commit Message

Bernd Kuhls Oct. 5, 2025, 12:32 p.m. UTC
Fixes Apache runtime error:

    /usr/bin/httpd: Relink `/usr/lib64/libapr-1.so.0' with `/lib64/libm.so.6' for IFUNC symbol `modf'

caused by glibc bump to 2.42 with buildroot commit
fb6256c0efbc93d242e9ae2aa2d3b4a2e7fd149c.

Configure check of apr does not detect the need for -lm:
    checking for library containing modf... none required

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 package/apr/apr.mk | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/package/apr/apr.mk b/package/apr/apr.mk
index 1c7553a501..98a7ece620 100644
--- a/package/apr/apr.mk
+++ b/package/apr/apr.mk
@@ -50,6 +50,10 @@  APR_CONF_ENV = \
 	apr_preload_done=yes
 APR_CONFIG_SCRIPTS = apr-1-config
 
+ifeq ($(BR2_PACKAGE_GLIBC),y)
+APR_CONF_ENV += LIBS=-lm
+endif
+
 # Doesn't even try to guess when cross compiling
 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
 APR_CONF_ENV += apr_cv_pthreads_lib="-lpthread"