Skip to content

Commit

Permalink
let bzip2 use correct CC and AR
Browse files Browse the repository at this point in the history
  • Loading branch information
crazywhalecc committed Oct 23, 2023
1 parent 9b9644f commit 8dcec73
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/SPC/builder/unix/library/bzip2.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ trait bzip2
{
protected function build(): void
{
$cc = getenv('CC');
$ar = getenv('AR');
if ($ar === false) {
$ar = 'ar';
}
shell()->cd($this->source_dir)
->exec("make PREFIX='" . BUILD_ROOT_PATH . "' clean")
->exec("make -j{$this->builder->concurrency} PREFIX='" . BUILD_ROOT_PATH . "' libbz2.a")
->exec("make -j{$this->builder->concurrency} PREFIX='" . BUILD_ROOT_PATH . "' CC={$cc} AR={$ar} libbz2.a")
->exec('cp libbz2.a ' . BUILD_LIB_PATH)
->exec('cp bzlib.h ' . BUILD_INCLUDE_PATH);
}
Expand Down

0 comments on commit 8dcec73

Please sign in to comment.