php7: fix module loading with glibc (refs #16642) 16741/head
authorMichael Heimpold <mhei@heimpold.de>
Sun, 26 Sep 2021 19:57:36 +0000 (21:57 +0200)
committerMichael Heimpold <mhei@heimpold.de>
Sun, 26 Sep 2021 19:57:44 +0000 (21:57 +0200)
Without -ldl linker flag .so extensions are not loaded
when glibc is used. Fix it by providing adjusted LDFLAGS
for this case.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
lang/php7/Makefile

index ed1566459d8857ee80eaa9249bc64bf3a7c2e738..97ef1fe63baf61725df870df9b664517a363a48a 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
 PKG_VERSION:=7.4.23
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
 PKG_LICENSE:=PHP-3.01
@@ -175,6 +175,10 @@ CONFIGURE_ARGS+= \
        --with-external-pcre \
        --with-zlib="$(STAGING_DIR)/usr"
 
+ifeq ($(CONFIG_LIBC_USE_GLIBC),y)
+TARGET_LDFLAGS += -ldl
+endif
+
 ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-bcmath),)
   CONFIGURE_ARGS+= --enable-bcmath=shared
 else