Support -fPIC and -fPIE for most libs and PHP

This commit is contained in:
crazywhalecc
2025-03-10 00:39:20 +08:00
parent 4eeb48cdc2
commit 2a9cd436b6
37 changed files with 96 additions and 74 deletions

View File

@@ -36,7 +36,8 @@ trait nghttp2
[,,$destdir] = SEPARATED_PATH;
shell()->cd($this->source_dir)
->exec(
->setEnv(['CFLAGS' => $this->getLibExtraCFlags(), 'LDFLAGS' => $this->getLibExtraLdFlags(), 'LIBS' => $this->getLibExtraLibs()])
->execWithEnv(
'./configure ' .
'--enable-static ' .
'--disable-shared ' .
@@ -45,9 +46,9 @@ trait nghttp2
$args . ' ' .
'--prefix='
)
->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}");
$this->patchPkgconfPrefix(['libnghttp2.pc']);
}
}