When using a custom GCC toolchain with Bazel (remote execution via Buildbarn), C++ linking fails with many undefined references to standard C++ symbols.
The linker is invoked as:
gcc -o ...
instead of:
g++ -o ...
This results in missing symbols like:
std::__cxx11::basic_string
operator new/delete
__gxx_personality_v0
Expected behavior:
C++ linking should use g++ or otherwise include libstdc++ automatically.
Actual behavior:
gcc is used without linking libstdc++, causing link failures.
Environment:
Bazel 8.4.2
Linux (container-based execution)
Remote execution via Buildbarn
Question:
Is this expected behavior for GCC toolchains, or should the toolchain explicitly ensure g++ (or -lstdc++) is used for C++ linking?
When using a custom GCC toolchain with Bazel (remote execution via Buildbarn), C++ linking fails with many undefined references to standard C++ symbols.
The linker is invoked as:
gcc -o ...
instead of:
g++ -o ...
This results in missing symbols like:
std::__cxx11::basic_string
operator new/delete
__gxx_personality_v0
Expected behavior:
C++ linking should use g++ or otherwise include libstdc++ automatically.
Actual behavior:
gcc is used without linking libstdc++, causing link failures.
Environment:
Bazel 8.4.2
Linux (container-based execution)
Remote execution via Buildbarn
Question:
Is this expected behavior for GCC toolchains, or should the toolchain explicitly ensure g++ (or -lstdc++) is used for C++ linking?