File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -546,6 +546,7 @@ protected function getSharedExtensionEnv(): array
546546 'CFLAGS ' => $ config ['cflags ' ],
547547 'CXXFLAGS ' => $ config ['cflags ' ],
548548 'LDFLAGS ' => $ config ['ldflags ' ],
549+ 'EXTRA_LDFLAGS ' => getenv ('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS ' ),
549550 'LIBS ' => clean_spaces ("{$ preStatic } {$ staticLibs } {$ postStatic } {$ sharedLibs }" ),
550551 'LD_LIBRARY_PATH ' => BUILD_LIB_PATH ,
551552 ];
Original file line number Diff line number Diff line change @@ -283,9 +283,14 @@ protected function buildEmbed(): void
283283
284284 // process libphp.so for shared embed
285285 $ libphpSo = BUILD_LIB_PATH . '/libphp.so ' ;
286+ $ libphpSoDest = BUILD_LIB_PATH . '/libphp.so ' ;
286287 if (file_exists ($ libphpSo )) {
287288 // deploy libphp.so
288- $ this ->deployBinary ($ libphpSo , $ libphpSo , false );
289+ preg_match ('/-release\s+(\S*)/ ' , getenv ('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS ' ), $ matches );
290+ if (!empty ($ matches [1 ])) {
291+ $ libphpSoDest = str_replace ('.so ' , '- ' . $ matches [1 ] . '.so ' , $ libphpSo );
292+ }
293+ $ this ->deployBinary ($ libphpSo , $ libphpSoDest , false );
289294 }
290295
291296 // process shared extensions build-with-php
You can’t perform that action at this time.
0 commit comments