Skip to content

Commit 5334727

Browse files
committed
remove -L/usr/lib64 (need to put it in the zig-cc script, stupid to add it in 15 different places instead)
1 parent 253206d commit 5334727

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

config/env.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ SPC_CMD_VAR_PHP_CONFIGURE_CFLAGS="${SPC_DEFAULT_C_FLAGS} -fPIE"
9696
; CPPFLAGS for configuring php
9797
SPC_CMD_VAR_PHP_CONFIGURE_CPPFLAGS="-I${BUILD_INCLUDE_PATH}"
9898
; LDFLAGS for configuring php
99-
SPC_CMD_VAR_PHP_CONFIGURE_LDFLAGS="-L${BUILD_LIB_PATH} -L/usr/lib64"
99+
SPC_CMD_VAR_PHP_CONFIGURE_LDFLAGS="-L${BUILD_LIB_PATH}"
100100
; LIBS for configuring php
101101
SPC_CMD_VAR_PHP_CONFIGURE_LIBS="-ldl -lrt -lpthread -lm -lresolv -lutil"
102102
; EXTRA_CFLAGS for `make` php

src/SPC/builder/linux/LinuxBuilder.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,16 +338,12 @@ protected function buildEmbed(): void
338338

339339
private function getMakeExtraVars(): array
340340
{
341-
$env = [
341+
return [
342342
'EXTRA_CFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'),
343343
'EXTRA_LIBS' => getenv('SPC_EXTRA_LIBS') . ' ' . getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS'),
344344
'EXTRA_LDFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS'),
345345
'EXTRA_LDFLAGS_PROGRAM' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS_PROGRAM'),
346346
];
347-
if (str_contains(getenv('CC'), 'zig')) {
348-
$env['LDFLAGS'] = getenv('LDFLAGS') . ' -L/usr/lib64';
349-
}
350-
return $env;
351347
}
352348

353349
/**

src/SPC/builder/unix/UnixBuilderBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ protected function buildFrankenphp(): void
351351
'GOPATH' => PKG_ROOT_PATH . '/go',
352352
'CGO_ENABLED' => '1',
353353
'CGO_CFLAGS' => $config['cflags'],
354-
'CGO_LDFLAGS' => "{$config['ldflags']} {$config['libs']} {$lrt} -L/usr/lib64",
354+
'CGO_LDFLAGS' => "{$config['ldflags']} {$config['libs']} {$lrt}",
355355
'XCADDY_GO_BUILD_FLAGS' => '-buildmode=pie ' .
356356
'-ldflags \"-linkmode=external ' . $extLdFlags . ' ' . $debugFlags .
357357
'-X \'github.com/caddyserver/caddy/v2.CustomVersion=FrankenPHP ' .

0 commit comments

Comments
 (0)