diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2022-01-06 08:37:18 +0000 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2022-12-23 08:53:17 +0000 |
commit | a846817739c1e7b930d593cd51963d6b46b5dfc6 (patch) | |
tree | e02791743f332c918878dd8514736619063b13d2 /ltversion.m4 | |
parent | 16eb1f43ab4e521ed4503e7766eee25da75eaeba (diff) | |
download | gcc-a846817739c1e7b930d593cd51963d6b46b5dfc6.zip gcc-a846817739c1e7b930d593cd51963d6b46b5dfc6.tar.gz gcc-a846817739c1e7b930d593cd51963d6b46b5dfc6.tar.bz2 |
c++, driver: Fix -static-libstdc++ for targets without Bstatic/dynamic.
The current implementation for swapping between the static and shared c++
runtimes relies on the static linker supporting Bstatic/dynamic which is
not available for every target (Darwin's linker does not support this).
Specs substitution (%s) is an alternative solution for this (which is what
Darwin uses for Fortran, D and Objective-C). However, specs substitution
requires that the '-static-libstdc++' be preserved in the driver's command
line. The patch here arranges for this to be done when the configuration
determines that linker support for Bstatic/dynamic is missing.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/ChangeLog:
* g++spec.cc (lang_specific_driver): Preserve -static-libstdc++ in
the driver command line for targets without -Bstatic/dynamic support
in their static linker.
Diffstat (limited to 'ltversion.m4')
0 files changed, 0 insertions, 0 deletions