File tree Expand file tree Collapse file tree 3 files changed +2
-19
lines changed
Expand file tree Collapse file tree 3 files changed +2
-19
lines changed Original file line number Diff line number Diff line change 55namespace SPC \builder \extension ;
66
77use SPC \builder \Extension ;
8- use SPC \builder \linux \SystemUtil ;
98use SPC \util \CustomExt ;
9+ use SPC \util \SPCTarget ;
1010
1111#[CustomExt('imagick ' )]
1212class imagick extends Extension
@@ -20,7 +20,7 @@ public function getUnixConfigureArg(bool $shared = false): string
2020 protected function getStaticAndSharedLibs (): array
2121 {
2222 [$ static , $ shared ] = parent ::getStaticAndSharedLibs ();
23- if (SystemUtil:: getLibcVersionIfExists ( 'glibc ' ) && SystemUtil:: getLibcVersionIfExists ( ' glibc ' ) <= '2.17 ' ) {
23+ if (SPCTarget:: getLibc () === 'glibc ' && version_compare (SPCTarget:: getLibcVersion (), '2.17 ' , ' <= ' ) ) {
2424 $ static .= ' -lstdc++ ' ;
2525 $ shared = str_replace ('-lstdc++ ' , '' , $ shared );
2626 }
Original file line number Diff line number Diff line change @@ -37,13 +37,6 @@ public function __construct(array $options = [])
3737 $ this ->arch_c_flags = getenv ('SPC_DEFAULT_C_FLAGS ' );
3838 $ this ->arch_cxx_flags = getenv ('SPC_DEFAULT_CXX_FLAGS ' );
3939
40- // cross-compiling is not supported yet
41- /*if (php_uname('m') !== $this->arch) {
42- $this->cross_compile_prefix = SystemUtil::getCrossCompilePrefix($this->cc, $this->arch);
43- logger()->info('using cross compile prefix: ' . $this->cross_compile_prefix);
44- $this->configure_env .= " CROSS_COMPILE='{$this->cross_compile_prefix}'";
45- }*/
46-
4740 // create pkgconfig and include dir (some libs cannot create them automatically)
4841 f_mkdir (BUILD_LIB_PATH . '/pkgconfig ' , recursive: true );
4942 f_mkdir (BUILD_INCLUDE_PATH , recursive: true );
Original file line number Diff line number Diff line change @@ -43,16 +43,6 @@ public function testFindHeader()
4343 $ this ->assertIsArray (SystemUtil::findHeader ('elf.h ' ));
4444 }
4545
46- public function testGetCrossCompilePrefix ()
47- {
48- $ this ->assertIsString (SystemUtil::getCrossCompilePrefix ('gcc ' , 'x86_64 ' ));
49- }
50-
51- public function testGetCCType ()
52- {
53- $ this ->assertEquals ('gcc ' , SystemUtil::getCCType ('xjfoiewjfoewof-gcc ' ));
54- }
55-
5646 public function testGetSupportedDistros ()
5747 {
5848 $ this ->assertIsArray (SystemUtil::getSupportedDistros ());
You can’t perform that action at this time.
0 commit comments