mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
fix libffi compiling without -fPIC because of missing env (#657)
Co-authored-by: Marc Henderkes <m.henderkes@pc-college.de>
This commit is contained in:
parent
146a4d334b
commit
8a4ba7a876
@ -18,22 +18,22 @@ class libffi extends LinuxLibraryBase
|
||||
public function build(): void
|
||||
{
|
||||
[$lib, , $destdir] = SEPARATED_PATH;
|
||||
|
||||
$arch = getenv('SPC_ARCH');
|
||||
|
||||
shell()->cd($this->source_dir)
|
||||
->exec(
|
||||
->setEnv(['CFLAGS' => $this->getLibExtraCFlags(), 'LDFLAGS' => $this->getLibExtraLdFlags(), 'LIBS' => $this->getLibExtraLibs()])
|
||||
->execWithEnv(
|
||||
'./configure ' .
|
||||
'--enable-static ' .
|
||||
'--disable-shared ' .
|
||||
"--host={$arch}-unknown-linux " .
|
||||
"--target={$arch}-unknown-linux " .
|
||||
'--prefix= ' . // use prefix=/
|
||||
'--prefix= ' .
|
||||
"--libdir={$lib}"
|
||||
)
|
||||
->exec('make clean')
|
||||
->exec("make -j{$this->builder->concurrency}")
|
||||
->exec("make install DESTDIR={$destdir}");
|
||||
->execWithEnv('make clean')
|
||||
->execWithEnv("make -j{$this->builder->concurrency}")
|
||||
->execWithEnv("make install DESTDIR={$destdir}");
|
||||
|
||||
if (is_file(BUILD_ROOT_PATH . '/lib64/libffi.a')) {
|
||||
copy(BUILD_ROOT_PATH . '/lib64/libffi.a', BUILD_ROOT_PATH . '/lib/libffi.a');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user