From: Daniel Golle Date: Thu, 10 Sep 2026 12:48:17 +0000 (+0100) Subject: php8: drop libatomic dependency X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=b20484d843a28ac105dcf01d8790dd7a21ada0fb;p=openwrt-packages.git php8: drop libatomic dependency PHP's configure script probes __atomic_exchange_1 as an external function on riscv64, which only resolves against libatomic, and so links the library although no binary references an atomic symbol. The riscv64-only dependency and linker flag paper over that. Link with --as-needed so the unused library is dropped and remove both; mips and riscv64 builds import no atomic symbols. Signed-off-by: Daniel Golle --- diff --git a/lang/php8/Makefile b/lang/php8/Makefile index 8e109a5c0..f104b2203 100644 --- a/lang/php8/Makefile +++ b/lang/php8/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=php PKG_VERSION:=8.4.23 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Michael Heimpold PKG_LICENSE:=PHP-3.01 @@ -86,7 +86,7 @@ endef define Package/php8-cli $(call Package/php8/Default) - DEPENDS+= +PHP8_INTL:libstdcpp +riscv64:libatomic + DEPENDS+= +PHP8_INTL:libstdcpp TITLE+= (CLI) endef @@ -97,7 +97,7 @@ endef define Package/php8-cgi $(call Package/php8/Default) - DEPENDS+= +PHP8_INTL:libstdcpp +riscv64:libatomic + DEPENDS+= +PHP8_INTL:libstdcpp TITLE+= (CGI & FastCGI) endef @@ -119,7 +119,7 @@ endef define Package/php8-fpm $(call Package/php8/Default) - DEPENDS+= +PHP8_INTL:libstdcpp +riscv64:libatomic + DEPENDS+= +PHP8_INTL:libstdcpp TITLE+= (FPM) endef @@ -149,7 +149,6 @@ define Package/apache-mod-php8 CATEGORY:=Network DEPENDS+=PACKAGE_apache-mod-php8:apache \ +PHP8_INTL:libstdcpp \ - +riscv64:libatomic \ +libpcre2 +zlib TITLE:=PHP8 module for Apache Web Server endef @@ -189,9 +188,7 @@ endif ifeq ($(CONFIG_USE_MUSL),y) TARGET_CFLAGS += -D_LARGEFILE64_SOURCE endif -ifneq ($(findstring riscv64,$(CONFIG_ARCH)),) -TARGET_LDFLAGS += -latomic -endif +TARGET_LDFLAGS += -Wl,--as-needed ifeq ($(CONFIG_PHP8_GETTEXT),y) @@ -605,8 +602,6 @@ define BuildModule define Package/php8-mod-$(1) $(call Package/php8/Default) - DEPENDS+=+riscv64:libatomic - ifneq ($(3),) DEPENDS+=$(3) endif