Skip to content

Commit f9af24e

Browse files
committed
dont fail on -lomp
1 parent 864c55f commit f9af24e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/SPC/builder/extension/imagick.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function patchBeforeMake(): bool
1919
return false;
2020
}
2121
// imagick with calls omp_pause_all, which requires openmp, on non-musl we build imagick without openmp
22-
$extra_libs = trim(getenv('SPC_EXTRA_LIBS') . ' -L/usr/lib64 -lomp');
22+
$extra_libs = trim(getenv('SPC_EXTRA_LIBS') . ' -lomp');
2323
f_putenv('SPC_EXTRA_LIBS=' . $extra_libs);
2424
return true;
2525
}
@@ -38,6 +38,9 @@ protected function getStaticAndSharedLibs(): array
3838
$static .= ' -lstdc++';
3939
$shared = str_replace('-lstdc++', '', $shared);
4040
}
41+
if (str_contains(getenv('CC'), 'zig')) {
42+
$shared = str_replace('-lomp', '/usr/lib64/libomp.so', $shared);
43+
}
4144
return [$static, $shared];
4245
}
4346
}

0 commit comments

Comments
 (0)