From patchwork Thu Jan 21 04:51:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 1429627 X-Patchwork-Delegate: mail@aparcar.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=WkUVtMve; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=fpLC0NjA; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DLqmD5D2bz9sW1 for ; Thu, 21 Jan 2021 15:53:48 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=XTJ3TnYURiYOC/h+b59kZi/JXRR4xxNUb1HLUIZr1g8=; b=WkUVtMvesg5pZpJP8md+AjaUSE jV/8akIquAbejqKGMSuy9psNpIEZROq2EJhk7+pJ9SEwMMkbI7LtqsfW3a9+6ONyRTWBopsz6xOtQ dbXLJ3bDHmaya679dEfARglFEsu7ZOC45cWaQeOqdWmudbwlR5N+AmhQNG9reQb05RRkoEBX3tCTf ppTliXdCRIeB+qM4D68ZJzO7ndw/Rxvi698mCeMqOHUJmm+mycFBLCaP4C/eD5Fo7Njq/nxbNG6nX H3aWipF9DBL5RDJo1gkdIUwbgTWCM1NqPDXURdq16qcydbks8ElFlXwZIaE8HYk961HB1CWFal6Pg ea9IAQ5g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2Rwn-000121-GO; Thu, 21 Jan 2021 04:51:53 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2Rwl-00011P-4G for openwrt-devel@lists.openwrt.org; Thu, 21 Jan 2021 04:51:52 +0000 Received: by mail-pl1-x636.google.com with SMTP id u11so567972plg.13 for ; Wed, 20 Jan 2021 20:51:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=JlQd6Vss9DavqoTwwL5z3rqGg1TQRP/Cf/O/ZhPQJgI=; b=fpLC0NjAwFS1++F51PCEu0Rc6PI6xoUtaU2qi1dtZbLnpdLlsZgOr96w7n3KkI/xlm 1+RbY9oeIo2RYOBuLqY4YQhOuX0Dif3SBl15zvTVYHCnT/A2xucWmzzMBEr/R3IuUuea hpApFe6X12AFxLi0lV27457RvTzz+xvBqAJ5QywEIsv+uHIbGCUVLIOvo4uroSKOHlww 5vvVNBI9TnAnlBfnQh0gHeX0gWDGD5BZihifgosMIxZuLI6IHI5DZV8UuG1kOlnA5Vdi 6VYHfuia9fOCyo2TcyWvMKAaSyZmxfDN+M9Q7EHDHEVGAesvn3HBqZ/J68WZnTuvT1I3 UhVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=JlQd6Vss9DavqoTwwL5z3rqGg1TQRP/Cf/O/ZhPQJgI=; b=NoLQs1wEUuFNVg+aZe0nA7MzaYN1GiNK/jq8GsnJnS2S2wLaUCGAjDzBmhsx28uS9E QWYXcn0JgZczE4wln1e09NVrHDH+VXG9HjRuae9/Arm3UTzXrUCYbiAHUjyP0UHuHwfl xiKa7y/uYnNts0au/Ytz9HfVYSSJTmRphzp5C1UNGZlPZ2SmlwDufODGuNwjkT+ZEkk6 MrJcgg9EzOQ6cugRzkxZqnjzX+2OUZs7L6I2c1Pdy1Syvoz42eqFyODjtPMKAG0LP6bQ F+cOUwgPYTYJJURWcScopK/SplfGqQHMCW2wcuhNis6/mvZFR5RydEP+zY/pP38rREqD YzOQ== X-Gm-Message-State: AOAM5332tGIefnmYxiMxvN6NmLXPCdZThM7ZFPXlpj98y0NWl+xMnUGT NjcQjt5zZTTnEE4zdcEB6hP9fDoDW+ayag== X-Google-Smtp-Source: ABdhPJwmRha28T8Tt67zgP5l0YdVVQ5h1vC87CYDkGic4EQrP4VjIeEIc9DR8dMJGgUgYOnFDcdp5g== X-Received: by 2002:a17:90b:30c:: with SMTP id ay12mr9509632pjb.170.1611204707869; Wed, 20 Jan 2021 20:51:47 -0800 (PST) Received: from mangix-trapnet.lan ([2001:470:1f05:79e::a89]) by smtp.gmail.com with ESMTPSA id b19sm3830502pfo.24.2021.01.20.20.51.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:51:46 -0800 (PST) From: Rosen Penev To: openwrt-devel@lists.openwrt.org Subject: [PATCH] toolchain/libstdcpp: disable dual ABI and default to new Date: Wed, 20 Jan 2021 20:51:45 -0800 Message-Id: <20210121045145.2209388-1-rosenp@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_235151_202891_76AF4746 X-CRM114-Status: GOOD ( 11.59 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:636 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [rosenp[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org 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 --- 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