aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2022-12-22 19:00:13 +0000
committerIain Sandoe <iain@sandoe.co.uk>2023-01-05 12:48:00 +0000
commit2421470867f198c3aa57e0a7ab0d473aac4cdd38 (patch)
treee21c9b07cd8f016e3502163316a448d76f6e4b74 /gcc
parent29c3218618ef6177dc33871b26c8fbd9b21eabe1 (diff)
downloadgcc-2421470867f198c3aa57e0a7ab0d473aac4cdd38.zip
gcc-2421470867f198c3aa57e0a7ab0d473aac4cdd38.tar.gz
gcc-2421470867f198c3aa57e0a7ab0d473aac4cdd38.tar.bz2
modula-2, driver: Handle static-libstd++ for targets without static/dynamic
The follows the pattern used in C++ and D drivers to pass -static-libstdc++ onto the target driver to allow spec substitution of static libraries. NOTE: The handling of Bstatic/dynamic and the possible use of static libgm2 libraries is unimplemented in this driver so far. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> gcc/m2/ChangeLog: * gm2spec.cc (lang_specific_driver): Pass -static-libstdc++ on to the target driver if the linker does not support Bstatic/dynamic.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/m2/gm2spec.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/m2/gm2spec.cc b/gcc/m2/gm2spec.cc
index 680dd36..b9a5c4e 100644
--- a/gcc/m2/gm2spec.cc
+++ b/gcc/m2/gm2spec.cc
@@ -767,7 +767,12 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
case OPT_static_libstdc__:
library = library >= 0 ? 2 : library;
+#ifdef HAVE_LD_STATIC_DYNAMIC
+ /* Remove -static-libstdc++ from the command only if target supports
+ LD_STATIC_DYNAMIC. When not supported, it is left in so that a
+ back-end target can use outfile substitution. */
args[i] |= SKIPOPT;
+#endif
break;
case OPT_stdlib_: