Hi Simon, On 17 Jun 2015, at 21:29, Jonathan Wakely wrote: > On 17 June 2015 at 20:43, Simon Wright wrote: >> Any workrounds? > > yes, it doesn't work with current sources - I have a patch to make it > work for linkers without -Bdynamic/Bstatic NOTE: this is from my local "WIP" branch and hasn't been reviewed upstream - whilst it Works For Me(tm), it might not be acceptable there. let me know if it works for you, cheers Iain ---- >From 61318a3c0931b5aa64dfd5972fd751711f592c04 Mon Sep 17 00:00:00 2001 From: Iain Sandoe <iain@xxxxxxxxxxxxxxxx> Date: Sun, 3 Aug 2014 15:49:48 +0100 Subject: [PATCH] Pass on -static-libstdc++ for platforms without Bstatic/dynamic. --- gcc/cp/g++spec.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c index 6536d7e..48a9708 100644 --- a/gcc/cp/g++spec.c +++ b/gcc/cp/g++spec.c @@ -363,6 +363,15 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, &new_decoded_options[j]); j++; } +#else + /* For linkers that don't support Bstatic/dynamic push the flag back + so that spec substitution can see it. */ + if (library > 1 && !static_link) + { + generate_option (OPT_static_libstdc__, NULL, 0, CL_DRIVER, + &new_decoded_options[j]); + j++; + } #endif } if (saw_math) -- 2.2.1