From 861c49c9bc30278c6621ce7df96bfe842cd96c1a Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Tue, 6 May 2025 16:24:57 +0700 Subject: [PATCH] make sure -fpic -fpie from CFLAGS bleeds through to libxslt compilation --- src/SPC/builder/unix/library/libxslt.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/SPC/builder/unix/library/libxslt.php b/src/SPC/builder/unix/library/libxslt.php index 17fb2f1e..4026b533 100644 --- a/src/SPC/builder/unix/library/libxslt.php +++ b/src/SPC/builder/unix/library/libxslt.php @@ -25,12 +25,14 @@ trait libxslt } } shell()->cd($this->source_dir) - ->exec( - 'CFLAGS="-I' . BUILD_INCLUDE_PATH . '" ' . + ->setEnv([ + 'CFLAGS' => trim($this->getLibExtraCFlags() . ' -I' . BUILD_INCLUDE_PATH), + 'LDFLAGS' => trim($this->getLibExtraLdFlags() . ' -L' . BUILD_LIB_PATH), + 'LIBS' => trim($this->getLibExtraLibs() . "{$required_libs} -lstdc++") + ]) + ->execWithEnv( "{$this->builder->getOption('library_path')} " . "{$this->builder->getOption('ld_library_path')} " . - 'LDFLAGS="-L' . BUILD_LIB_PATH . '" ' . - "LIBS='{$required_libs} -lstdc++' " . './configure ' . '--enable-static --disable-shared ' . '--without-python ' . @@ -41,9 +43,9 @@ trait libxslt '--with-libxml-prefix=' . escapeshellarg(BUILD_ROOT_PATH) . ' ' . '--prefix=' ) - ->exec('make clean') - ->exec("make -j{$this->builder->concurrency}") - ->exec('make install DESTDIR=' . escapeshellarg(BUILD_ROOT_PATH)); + ->execWithEnv('make clean') + ->execWithEnv("make -j{$this->builder->concurrency}") + ->execWithEnv('make install DESTDIR=' . escapeshellarg(BUILD_ROOT_PATH)); $this->patchPkgconfPrefix(['libexslt.pc']); } }