mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
place -lstdc++ in compiler_extra
This commit is contained in:
parent
a0564628c4
commit
b16638d813
@ -405,6 +405,7 @@ class Extension
|
|||||||
'LDFLAGS' => $config['ldflags'],
|
'LDFLAGS' => $config['ldflags'],
|
||||||
'LIBS' => $preStatic . $staticLibString . $postStatic . $sharedLibString,
|
'LIBS' => $preStatic . $staticLibString . $postStatic . $sharedLibString,
|
||||||
'LD_LIBRARY_PATH' => BUILD_LIB_PATH,
|
'LD_LIBRARY_PATH' => BUILD_LIB_PATH,
|
||||||
|
'COMPILER_EXTRA' => '-lstdc++'
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($this->patchBeforeSharedPhpize()) {
|
if ($this->patchBeforeSharedPhpize()) {
|
||||||
|
|||||||
@ -42,15 +42,10 @@ fi
|
|||||||
output=$(zig cc $TARGET $COMPILER_EXTRA "${PARSED_ARGS[@]}" 2>&1)
|
output=$(zig cc $TARGET $COMPILER_EXTRA "${PARSED_ARGS[@]}" 2>&1)
|
||||||
status=$?
|
status=$?
|
||||||
|
|
||||||
if [ $status -eq 0 ]; then
|
if [ $status -ne 0 ] && echo "$output" | grep -q "version '.*' in target triple"; then
|
||||||
echo "$output"
|
output=$(echo "$output" | grep -v "version '.*' in target triple")
|
||||||
exit 0
|
status=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if echo "$output" | grep -q "version '.*' in target triple"; then
|
echo "$output"
|
||||||
echo "$output" | grep -v "version '.*' in target triple"
|
exit $status
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
echo "$output"
|
|
||||||
exit $status
|
|
||||||
fi
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user