mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
make sure -ldl is not taken as needed, problem on EL8
This commit is contained in:
parent
e323d7b155
commit
927d7f55ba
@ -32,7 +32,10 @@ trait imagemagick
|
||||
);
|
||||
|
||||
// special: linux-static target needs `-static`
|
||||
$ldflags = SPCTarget::isStatic() ? ('-static -ldl') : '-ldl';
|
||||
$ldflags = SPCTarget::isStatic() ? '-static -ldl' : '-ldl';
|
||||
if (str_contains($this->builder->arch_ld_flags, '-Wl,--as-needed')) {
|
||||
$ldflags = str_replace('-ldl', '-Wl,--no-as-needed -ldl -Wl,--as-needed', $ldflags);
|
||||
}
|
||||
|
||||
// special: macOS needs -iconv
|
||||
$libs = SPCTarget::getTargetOS() === 'Darwin' ? '-liconv' : '';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user