Skip to content

Commit a51474b

Browse files
committed
Autotools: Add -fvisibility=hidden also in phpize
This builds shared extensions in php-src and through phpize with the same visibility preset.
1 parent 115ea48 commit a51474b

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

UPGRADING.INTERNALS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ PHP 8.6 INTERNALS UPGRADE NOTES
9191
- Unix build system changes:
9292
. Symbol HAVE_ST_BLOCKS has been removed from php_config.h (use
9393
HAVE_STRUCT_STAT_ST_BLOCKS).
94+
. When using phpize, extensions are now built with -fvisibility=hidden compile
95+
option (when building inside php-src this was already enabled previously).
9496

9597
========================
9698
3. Module changes

scripts/phpize.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ AS_VAR_IF([PHP_DEBUG], [yes], [
127127
dnl Always shared.
128128
PHP_BUILD_SHARED
129129

130+
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],
131+
[CFLAGS="$CFLAGS -fvisibility=hidden"])
132+
130133
PHP_HELP_SEPARATOR([Extension:])
131134
PHP_CONFIGURE_PART([Configuring extension])
132135

0 commit comments

Comments
 (0)