inserting -stdlib=libstdc++ into cxxflags

René J.V. Bertin rjvbertin at
Tue Mar 12 19:32:12 UTC 2024


I've been tinkering a bit with a personal GCC12 build patched to use libc++ by default, and now find myself unable to build against libstdc++.

`configure.cxxflags-append -stdlib=libstdc++` appears to be filtered out somewhere in the "base" bowels, and `configure.cxx_stdlib libstdc++` appears not to have any effect either. I'm not seeing any warnings in the logfile, which is surprising (and rather bad practise IMHO).

What am I missing here, and what backdoor(s) could I use? I notice that CXXFLAGS (aka Env(CXXFLAGS)) isn't yet set in `pre-configure`; I haven't yet checked if "base" preserves its settings when initialising it (have been assuming it won't). With autoconf-based projects one can set `configure.cxx ${configure.cxx} -stdlib=libstdc++` but that doesn't fly for cmake-based projects...


More information about the macports-dev mailing list