From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [IPv6:2001:67c:2050:0:465::103]) by sourceware.org (Postfix) with ESMTPS id E72273858417; Sun, 14 Apr 2024 00:35:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E72273858417 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E72273858417 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:67c:2050:0:465::103 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713054902; cv=none; b=svgB2LzKkhEMxIJh/7OGqWPl1VFaVEgZITN5aaHaa8lE5GgbVwn8X8iNnspxYyXIr8IjcTQQxqvs2LMS6Me8WN4kS0kZ/weYto7BGePuGbTvJ/ZpX9cVBP2s4pIEN43voorUgkbVmKmXZpawjz52g7AN+AOIvgSIwnDr8A6iVBE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713054902; c=relaxed/simple; bh=kM3rF2GNwXR2yfYDaFDC3K6nYiOn/UzOu1nS7BUg6hM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=typYQ+UfV8XbOfWxsfFVmza3XGvlMz/BMCWuA3jnvushS7DoXW8kE6/W8nzJeSpt4c0SA5yIddy/dTZJ3+zC/T4dGSsDC8F91tgZAoVV1yHIqVgwmPzrBWcrWXjqs+PEyi6PACpXdcbKQA2fyZd2TzBbPPQ6OtknuMw17QGRDrc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (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 mout-p-103.mailbox.org (Postfix) with ESMTPS id 4VHBCP6sZkz9sQ8; Sun, 14 Apr 2024 02:34:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1713054897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=ryDGLk4Na/9DOwT/kzcQaOLPDOOeN25DsQV2XPBlDEs=; b=KVcgXYMbbOsNprD5mtsN+CNcKKt9aHikjuC7SvYIQvLfmBedCJU8pIeFyztiROSURzXkq/ QV6C9UEtCmlkZi+K2odAmwMn/K89ifjz05pq/XHyyN2Q/feuy3GRwt/RMnI0afU+mYTnzy Pxw5GIGfTmptNEBn1HHXe3580gihFuGN07gjr34CzJHakIwC1e28wuhE+TSh4kqV1uKiB4 tl4L/vuGq3D3eeOyvAVn3iq3cVbvmHJLZ0kmRf5rqHPGqUL8LspMSQbPNrUjp81kJ5F1AE 8e7RlBT2/jynIlcL7E9jOagOEF7jhHuQ7KtkaodSLx0I+1fLrQ1Fxmgvf9YonQ== From: =?utf-8?Q?Arsen_Arsenovi=C4=87?= To: libstdc++ Cc: Gcc Subject: libstdc++ -> libiconv depenedncy: implications on in-tree libiconv Date: Sun, 14 Apr 2024 02:34:55 +0200 Message-ID: <867ch0rdcg.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_INFOUSMEBIZ,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Evening! While working on https://inbox.sourceware.org/20240414001113.1698685-1-arsen@aarsen.me/ I had noticed that libstdc++ currently does not get linked against an in-tree libiconv, as the in-tree libiconv is only a host library. Should it also be a target one? With a quick hack of copying libiconv in the build dir as arm64-apple-darwin21.6.0/libiconv, I had managed to get libstdc++ not to link system libiconv. This implies that simply enabling building iconv as a target library also would suffice. There are considerations with this, though: naturally, this implies that libstdc++ now contains a copy of libiconv as it gets linked in as a '.a'. It appears not to cause a copy of the symbols to be emitted on this platform: cfarm104:gcc-build arsen$ objdump --syms ./aarch64-apple-darwin21.6.0/lib= stdc++-v3/src/.libs/libstdc++.6.dylib | grep iconv cfarm104:gcc-build arsen$ ... however, even in that case, the symbols are renamed AFAICT: cfarm104:gcc-build arsen$ objdump --syms ./aarch64-apple-darwin21.6.0/lib= iconv/lib/.libs/libiconv.a | grep iconv ./aarch64-apple-darwin21.6.0/libiconv/lib/.libs/libiconv.a(iconv.o): file= format mach-o arm64 00000000000dbbe0 g O __DATA,__data __libiconv_version 0000000000013730 g F __TEXT,__text _iconv_canonicalize 0000000000013080 g F __TEXT,__text _libiconv 00000000000130c0 g F __TEXT,__text _libiconv_close 0000000000012ca0 g F __TEXT,__text _libiconv_open 00000000000130e0 g F __TEXT,__text _libiconv_open_into 0000000000013468 g F __TEXT,__text _libiconvctl 00000000000135ac g F __TEXT,__text _libiconvlist ./aarch64-apple-darwin21.6.0/libiconv/lib/.libs/libiconv.a(localcharset.o= ): file format mach-o arm64 ./aarch64-apple-darwin21.6.0/libiconv/lib/.libs/libiconv.a(relocatable.o)= : file format mach-o arm64 00000000000000e4 g F __TEXT,__text _libiconv_relocate 00000000000001e0 g F __TEXT,__text _libiconv_relocate2 0000000000000000 g F __TEXT,__text _libiconv_set_relocation_prefix ... so, that might be okay? What do you think? Should be build a libiconv as a target lib for libstdc++ use? TIA, have a lovely night! =2D-=20 Arsen Arsenovi=C4=87 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOYEARYKAI4WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCZhskr18UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0RkVF MkIzRDExM0ZDMDBBMzE2MkQ2MDYxNTJDMjk0MzAxRUEyQzQ5MxAcYXJzZW5AYWFy c2VuLm1lAAoJEFLClDAeosSTJjcBAMT+y39YLmdaRQyahgmn7wsjUt4E7C2O92+v pSqcDjwPAP9kOvVHuWzmnFFAlTVxw50I7/6q+G468T+/N9frjfxLAQ== =Euw4 -----END PGP SIGNATURE----- --=-=-=--