[Bug 221288] lang/gcc5 links against libsupc++ when compiling

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Aug 7 07:43:36 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221288

David Chisnall <theraven at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |theraven at FreeBSD.org

--- Comment #4 from David Chisnall <theraven at FreeBSD.org> ---
(In reply to Gerald Pfeifer from comment #1)

Using libstdc++ is moderately dangerous on FreeBSD, as it is not the system C++
standard library.  It is only moderately dangerous though, because it uses
different symbol names for the standard library symbols and so should result in
a hard linker error if attempting to use it for a public interface with
something linked against libc++.

Using libsupc++; however, is very dangerous.  It exports symbols with the same
names as those exported by libcxxrt.  These are likely to interfere in ways
that cause exciting forms of breakage.  The gcc ports should not be installing
a libstdc++ that links to libsupc++.

As to clang not working with libstdc++, last time I tried it -stdlib=libstdc++
worked, and would pick up the correct libstdc++ if the correct -I and -L flags
were passed.  If this doesn't work, please file a bug report.  As far as I
know, --gcc-toolchain is a compile-time configuration option (from the old and
now removed autoconf LLVM build system) to specify the default path for
headers, not a compiler flag.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-toolchain mailing list