> From: Jonathan Wakely <jwakely....@gmail.com> > Date: Wed, 16 Jul 2025 15:08:50 +0100 > Cc: qifan.z...@xpeedic.com, gcc@gcc.gnu.org > > > > AFAIU, this is accurate if libgcc and libstdc++ are linked statically, > > > but not if the program is linked to their DLL versions (and therefore > > > the DLLs must be distributed with the resulting program). In the > > > latter case, the LGPL exception doesn't apply, and distributing these > > > DLLs falls under GPL instead. > > > > Those libraries are not licensed with the LGPL so I don't know what > > that has to do with anything. > > And the GCC runtime exception makes no distinction between static and > dynamic linking.
That's not what RMS told me when I asked him some time ago. He said that, since libgcc DLL and libstdc++ DLL are basically separate files and thus separate builds of the libraries, the run-time exception you pointed to is not applicable to them. Quoting his response back then: There is nothing in this exception that would permit distribution of libgcc itself -- as a separate file -- other than under the GPL. (By "this exception" he alluded to the libgcc run-time exception.) > Please stop giving bad advice and direct people to read the > appropriate documentation. Why the animosity? I'm trying to help the OP understand the situation about which they asked. Please respect opinions of others and don't assume that differing opinions mean bad advice. I'm talking from experience of distributing many programs built with MinGW and linked against those libraries. > > > Since linking to these libraries statically is not recommended, > > > especially if the program is a C++ program, the above means in > > > practice that the two libraries, if a program is linked to them > > > dynamically, impose GPL. > > This is absolutely wrong. Not AFAIK, see above.