On 23 Feb 2017 09:01, Jack Bates wrote: > On 22/02/17 12:16 PM, Mike Frysinger wrote: > > On 22 Feb 2017 10:32, Jack Bates wrote: > >> How can I avoid dynamically linking with libstdc++? > >> or, how can I keep -lstdc++ out of $postdeps? > > > > let's back up. what is it you're actually trying to do ? > > you want to create a statically linked C++ program ? > > you want to link a C program ? > > something else ? > > Well, I'm asking for a friend [1]. It sounds like he's got one version > of libstdc++ in his build infrastructure and another (older) version on > his production machines. He wants to avoid using the older version (I > think because of an issue with the STL) which is why he's trying to keep > -lstdc++ out of the linker arguments.
unfortunately, trying to hack the link lines won't help with this. the headers and libraries are kept in sync. you can't use newer headers and try to run against older libraries. your best bet is probably to just get an older toolchain and use that to compile. or get a copy of the distro that's used in production and use that to compile the code you care about. distros often can be used in chroots so it's not like you need to reinstall the entire system. -mike
signature.asc
Description: Digital signature
_______________________________________________ https://lists.gnu.org/mailman/listinfo/libtool