mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-04 23:35:40 +08:00
Support -fPIC and -fPIE for most libs and PHP
This commit is contained in:
@@ -102,7 +102,11 @@ trait UnixLibraryTrait
|
||||
|
||||
public function getLibExtraCFlags(): string
|
||||
{
|
||||
return getenv($this->getSnakeCaseName() . '_CFLAGS') ?: '';
|
||||
$env = getenv($this->getSnakeCaseName() . '_CFLAGS') ?: '';
|
||||
if (!str_contains($env, $this->builder->arch_c_flags)) {
|
||||
$env .= $this->builder->arch_c_flags;
|
||||
}
|
||||
return $env;
|
||||
}
|
||||
|
||||
public function getLibExtraLdFlags(): string
|
||||
|
||||
Reference in New Issue
Block a user