[openwrt/openwrt] toolchain/libstdcpp: disable dual ABI and default to new
LEDE Commits
lede-commits at lists.infradead.org
Tue Jan 26 20:24:00 EST 2021
aparcar pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/01e4274c2117863603363c22f403af159c71cbfd
commit 01e4274c2117863603363c22f403af159c71cbfd
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Wed Jan 20 20:51:45 2021 -0800
toolchain/libstdcpp: disable dual ABI and default to new
GCC 5.1 changed the std::string ABI in order to properly support C++11.
For compatibility with libraries compiled with the older ABI, that is,
linking between old-abi.so and new-abi.bin, both ABIs are enabled. In
terms of OpenWrt, all packages are compiled with the same toolchain,
which means these issues do not need to be handled.
Most importantly, this results in a significant size reduction of
libstdpp:
Before:
450794 bytes
After:
327752 bytes
Tested with all OpenWrt packages.
Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
toolchain/gcc/common.mk | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index aaddb74642..55fad1fcc4 100644
--- a/toolchain/gcc/common.mk
+++ b/toolchain/gcc/common.mk
@@ -117,7 +117,9 @@ GCC_CONFIGURE:= \
--with-mpc=$(TOPDIR)/staging_dir/host \
--disable-decimal-float \
--with-diagnostics-color=auto-if-env \
- --enable-__cxa_atexit
+ --enable-__cxa_atexit \
+ --disable-libstdcxx-dual-abi \
+ --with-default-libstdcxx-abi=new
ifneq ($(CONFIG_mips)$(CONFIG_mipsel),)
GCC_CONFIGURE += --with-mips-plt
endif
More information about the lede-commits
mailing list