also use libstdc++.a for grpc?

This commit is contained in:
henderkes
2025-09-18 21:29:46 +02:00
parent 83696e92b7
commit 81430e6853
2 changed files with 13 additions and 2 deletions

View File

@@ -60,7 +60,17 @@ class grpc extends Extension
protected function getSharedExtensionEnv(): array
{
$env = parent::getSharedExtensionEnv();
$env['CPPFLAGS'] = $env['CXXFLAGS'];
$env['CPPFLAGS'] = $env['CXXFLAGS'] . ' -Wno-attributes';
return $env;
}
protected function splitLibsIntoStaticAndShared(string $allLibs): array
{
[$static, $shared] = parent::splitLibsIntoStaticAndShared($allLibs);
if (str_contains(getenv('PATH'), 'rh/devtoolset') || str_contains(getenv('PATH'), 'rh/gcc-toolset')) {
$static .= ' -l:libstdc++.a';
$shared = str_replace('-lstdc++', '', $shared);
}
return [clean_spaces($static), clean_spaces($shared)];
}
}