Skip to content

Commit 861c49c

Browse files
committed
make sure -fpic -fpie from CFLAGS bleeds through to libxslt compilation
1 parent e7d6f37 commit 861c49c

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

src/SPC/builder/unix/library/libxslt.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@ protected function build(): void
2525
}
2626
}
2727
shell()->cd($this->source_dir)
28-
->exec(
29-
'CFLAGS="-I' . BUILD_INCLUDE_PATH . '" ' .
28+
->setEnv([
29+
'CFLAGS' => trim($this->getLibExtraCFlags() . ' -I' . BUILD_INCLUDE_PATH),
30+
'LDFLAGS' => trim($this->getLibExtraLdFlags() . ' -L' . BUILD_LIB_PATH),
31+
'LIBS' => trim($this->getLibExtraLibs() . "{$required_libs} -lstdc++")
32+
])
33+
->execWithEnv(
3034
"{$this->builder->getOption('library_path')} " .
3135
"{$this->builder->getOption('ld_library_path')} " .
32-
'LDFLAGS="-L' . BUILD_LIB_PATH . '" ' .
33-
"LIBS='{$required_libs} -lstdc++' " .
3436
'./configure ' .
3537
'--enable-static --disable-shared ' .
3638
'--without-python ' .
@@ -41,9 +43,9 @@ protected function build(): void
4143
'--with-libxml-prefix=' . escapeshellarg(BUILD_ROOT_PATH) . ' ' .
4244
'--prefix='
4345
)
44-
->exec('make clean')
45-
->exec("make -j{$this->builder->concurrency}")
46-
->exec('make install DESTDIR=' . escapeshellarg(BUILD_ROOT_PATH));
46+
->execWithEnv('make clean')
47+
->execWithEnv("make -j{$this->builder->concurrency}")
48+
->execWithEnv('make install DESTDIR=' . escapeshellarg(BUILD_ROOT_PATH));
4749
$this->patchPkgconfPrefix(['libexslt.pc']);
4850
}
4951
}

0 commit comments

Comments
 (0)