Skip to content

Commit

Permalink
php7: 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 committed Sep 26, 2021
1 parent 863acbd commit d153c61
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lang/php7/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:=7.4.23
PKG_RELEASE:=2
PKG_RELEASE:=3

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_php7-mod-bcmath),)
CONFIGURE_ARGS+= --enable-bcmath=shared
else
Expand Down

0 comments on commit d153c61

Please sign in to comment.