From a19af5ee71e21c49ebc6e553ba36c0dc4cc5c216 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 26 Dec 2020 12:31:03 +0100 Subject: [PATCH] build: use C++11 ABI with libstdc++ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This macro needs to match between Node.js and addons that use C++ standard library types whose ABI differs (e.g. `std::string`). Therefore, a value for this should be specified in `common.gypi`. (Currently, the 32-bit ARM builds use this ABI, and other platforms don’t. It might also be possible to set this value to `0` instead, it’s only important that *a* value is specified.) Refs: https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html PR-URL: https://github.com/nodejs/node/pull/36634 Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Benjamin Gruenbaum --- common.gypi | 1 + 1 file changed, 1 insertion(+) diff --git a/common.gypi b/common.gypi index b665cfc96566e3..3d030895b087e0 100644 --- a/common.gypi +++ b/common.gypi @@ -245,6 +245,7 @@ 'defines': [ 'V8_DEPRECATION_WARNINGS', 'V8_IMMINENT_DEPRECATION_WARNINGS', + '_GLIBCXX_USE_CXX11_ABI=1', ], # Forcibly disable -Werror. We support a wide range of compilers, it's