add cache file option to autoconf executor by default (if cflags and ldflags match default)

This commit is contained in:
DubbleClick
2025-07-02 11:47:20 +07:00
parent 0695fb9381
commit 5577cd0fab
5 changed files with 30 additions and 12 deletions

View File

@@ -18,13 +18,8 @@ class libffi extends LinuxLibraryBase
*/
public function build(): void
{
$arch = getenv('SPC_ARCH');
UnixAutoconfExecutor::create($this)
->configure(
"--host={$arch}-unknown-linux",
"--target={$arch}-unknown-linux",
"--libdir={$this->getLibDir()}"
)
->configure()
->make();
if (is_file(BUILD_ROOT_PATH . '/lib64/libffi.a')) {

View File

@@ -24,7 +24,7 @@ trait gettext
if ($this->builder->getOption('enable-zts')) {
$autoconf->addConfigureArgs('--enable-threads=isoc+posix')
->appendEnv([
'CFLAGS' => '-lpthread -D_REENTRANT',
'CFLAGS' => '-D_REENTRANT',
'LDFLGAS' => '-lpthread',
]);
} else {

View File

@@ -17,6 +17,7 @@ trait unixodbc
protected function build(): void
{
UnixAutoconfExecutor::create($this)
->removeConfigureArgs('--cache-file')
->configure(
'--disable-debug',
'--disable-dependency-tracking',