-ldl and --with-pic for imagemagick

This commit is contained in:
DubbleClick
2025-05-31 14:19:04 +07:00
parent 764fdd4d08
commit 4c64707138
2 changed files with 4 additions and 2 deletions

View File

@@ -16,10 +16,12 @@ trait gettext
$cflags = $this->builder->getOption('enable-zts') ? '-lpthread -D_REENTRANT' : ''; $cflags = $this->builder->getOption('enable-zts') ? '-lpthread -D_REENTRANT' : '';
$ldflags = $this->builder->getOption('enable-zts') ? '-lpthread' : ''; $ldflags = $this->builder->getOption('enable-zts') ? '-lpthread' : '';
$ldl = $this->builder->getLib('libgomp') && getenv('SPC_LIBC') === 'glibc' ? '-ldl' : '';
shell()->cd($this->source_dir) shell()->cd($this->source_dir)
->setEnv([ ->setEnv([
'CFLAGS' => "{$this->getLibExtraCFlags()} {$cflags}", 'CFLAGS' => "{$this->getLibExtraCFlags()} {$cflags}",
'LDFLAGS' => $this->getLibExtraLdFlags() ?: $ldflags, 'LDFLAGS' => trim($this->getLibExtraLdFlags() . ' ' . $ldflags . ' ' . $ldl),
'LIBS' => $this->getLibExtraLibs(), 'LIBS' => $this->getLibExtraLibs(),
]) ])
->execWithEnv( ->execWithEnv(

View File

@@ -58,7 +58,7 @@ trait imagemagick
]) ])
->execWithEnv( ->execWithEnv(
'./configure ' . './configure ' .
'--enable-static --disable-shared ' . '--enable-static --disable-shared --with-pic ' .
$extra . $extra .
'--prefix=' '--prefix='
) )