Skip to content

Commit

Permalink
php8: fix module loading with glibc (refs openwrt#16642)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mhei authored and utoni committed Jan 21, 2022
1 parent 2e5efcc commit c5f5937
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lang/php8/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=php
PKG_VERSION:=8.0.10
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_MAINTAINER:=Michael Heimpold <[email protected]>
PKG_LICENSE:=PHP-3.01
Expand Down Expand Up @@ -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_php8-mod-bcmath),)
CONFIGURE_ARGS+= --enable-bcmath=shared
else
Expand Down

0 comments on commit c5f5937

Please sign in to comment.