File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,6 +148,8 @@ SPC_CMD_PREFIX_PHP_CONFIGURE="./configure --prefix= --with-valgrind=no --enable-
148148SPC_CMD_VAR_PHP_EMBED_TYPE =" static"
149149; EXTRA_CFLAGS for `configure` and `make` php
150150SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS =" -g -fstack-protector-strong -fpic -fpie -Werror=unknown-warning-option ${SPC_DEFAULT_C_FLAGS}"
151+ ; EXTRA_LDFLAGS for `make` php, can use -release to set a soname for libphp.so
152+ SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS =" "
151153; minimum compatible macOS version (LLVM vars, availability not guaranteed)
152154MACOSX_DEPLOYMENT_TARGET =12.0
153155
Original file line number Diff line number Diff line change @@ -456,7 +456,7 @@ public function buildUnixShared(): void
456456 // process *.so file
457457 $ soFile = BUILD_MODULES_PATH . '/ ' . $ this ->getName () . '.so ' ;
458458 $ soDest = $ soFile ;
459- preg_match ('/-release\s+(\S*)/ ' , getenv ('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS ' ) ?: '' , $ matches );
459+ preg_match ('/-release\s+(\S*)/ ' , getenv ('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS ' ), $ matches );
460460 if (!empty ($ matches [1 ])) {
461461 $ soDest = str_replace ('.so ' , '- ' . $ matches [1 ] . '.so ' , $ soFile );
462462 }
@@ -551,7 +551,7 @@ protected function getSharedExtensionEnv(): array
551551 'CFLAGS ' => $ config ['cflags ' ],
552552 'CXXFLAGS ' => $ config ['cflags ' ],
553553 'LDFLAGS ' => $ config ['ldflags ' ],
554- 'EXTRA_LDFLAGS ' => getenv ('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS ' ) ?: '' ,
554+ 'EXTRA_LDFLAGS ' => getenv ('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS ' ),
555555 'LIBS ' => clean_spaces ("{$ preStatic } {$ staticLibs } {$ postStatic } {$ sharedLibs }" ),
556556 'LD_LIBRARY_PATH ' => BUILD_LIB_PATH ,
557557 ];
You can’t perform that action at this time.
0 commit comments