[Bug 265962] lang/gcc11: expose non-default -stdlib=libc++ support

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 20 Aug 2022 19:13:23 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265962

            Bug ID: 265962
           Summary: lang/gcc11: expose non-default -stdlib=libc++ support
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: toolchain@FreeBSD.org
          Reporter: jbeich@FreeBSD.org
             Flags: maintainer-feedback?(toolchain@FreeBSD.org)
          Assignee: toolchain@FreeBSD.org

Created attachment 236025
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=236025&action=edit
v1 (apply via "git am")

$ 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.

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