HomeFreeBSD

www/firefox www/firefox-esr mail/thunderbird: fix build with libc++ 14

Description

www/firefox www/firefox-esr mail/thunderbird: fix build with libc++ 14

Mozilla attempts to redefine several internal libc++ functions, such as
__throw_out_of_range(). With libc++ 14 and higher, this now leads to
compile errors:

In file included from /wrkdirs/usr/ports/www/firefox/work/.build/dist/system_wrappers/deque:3:
/usr/include/c++/v1/deque:1865:9: error: call to '__throw_out_of_range' is ambiguous

_VSTD::__throw_out_of_range("deque");
^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/include/c++/v1/__config:824:15: note: expanded from macro '_VSTD'

^

/wrkdirs/usr/ports/www/firefox/work/.build/dist/include/mozilla/throw_gcc.h:97:59: note: candidate function
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_out_of_range(

^

/usr/include/c++/v1/stdexcept:264:6: note: candidate function
void throw_out_of_range(const char*msg)

^

To work around this issue, avoid redefining those internal libc++
functions, if _LIBCPP_VERSION is set.

(cherry picked from commit 20f8ce784b79819cb29d1f70d8a4ebac15aabeb9)

Details

Provenance
dimAuthored on Mar 16 2022, 7:43 PM
cmtCommitted on Mar 16 2022, 7:48 PM
Parents
R11:bede5427605b: x11-servers/xwayland-devel: update to 21.0.99.1.176
Branches
Unknown
Tags
Unknown