maintainer-feedback requested: [Bug 265962] lang/gcc11: expose non-default -stdlib=libc++ support
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 265962] lang/gcc11: expose non-default -stdlib=libc++ support"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 20 Aug 2022 19:13:23 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-toolchain (Nobody) <toolchain@FreeBSD.org> for maintainer-feedback: Bug 265962: lang/gcc11: expose non-default -stdlib=libc++ support https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265962 --- Description --- $ pkg install gcc11 $ echo 'int main() {}' >a.cc $ gcc11 -stdlib=libc++ a.cc gcc11: error: unrecognized command-line option '-stdlib=libc++' $ man gcc11 | col -b | fgrep -A9 stdlib= -stdlib=libstdc++,libc++ When G++ is configured to support this option, it allows specification of alternate C++ runtime libraries. Two options are available: libstdc++ (the default, native C++ runtime for G++) and libc++ which is the C++ runtime installed on some operating systems (e.g. Darwin versions from Darwin11 onwards). The option switches G++ to use the headers from the specified library and to emit "-lstdc++" or "-lc++" respectively, when a C++ runtime is required for linking.