From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [IPv6:2001:67c:2050:0:465::102]) by sourceware.org (Postfix) with ESMTPS id 406CC38A817F; Tue, 15 Nov 2022 18:27:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 406CC38A817F Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4NBZRD0wJTz9sqs; Tue, 15 Nov 2022 19:27:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1668536856; 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: in-reply-to:in-reply-to:references:references; bh=S6xaM2Rbn+YAh/mi7FgsGLVvh4X1Kob0GjDNZ6LbYAs=; b=I1GuJd3iP6m7SovtrbowHZAUVgDPDtPVyyVwBeQVpr0f1iHsYQZrXCibQFdC/GMygcQ5iJ WQk2TPq+FDsCs0vi4S8k782ANdzkCWxWT68kFC9JGKI8hYTMR2ZoPmWYcZOOIrA7GuHTXQ 5FPsPzTMRyrhXUlGG1/z6NbZzOxCqgcKBCOAj/+zjRw0DlHMbcxtLB9500BbsWIy5ReXlp lfa5uG0A4O7JLc2wbT8Jyu5sKGGHiWrhZ9OdveRgJuAVemhHSMCXovgsUPQAXQK3bJNKgC M+99+5zDgIbkys4zLDn+RRq8fVlqkEmDONCrupkOYoVXBK7WA+GTn2cUP1UKrw== References: <20221020154948.2511787-1-arsen@aarsen.me> From: Arsen =?utf-8?Q?Arsenovi=C4=87?= To: Jonathan Wakely Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: Re: [PATCH] libstdc++: Enable building libstdc++.{a,so} when !HOSTED Date: Tue, 15 Nov 2022 19:03:06 +0100 In-reply-to: Message-ID: <864jv0ul7v.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.5 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 Jonathan Wakely writes: > On Thu, 20 Oct 2022 at 16:53, Arsen Arsenovi=C4=87 via Libstdc++ > wrote: >> >> This enables us to provide symbols for placeholders and numeric limits, > > > I'm not convinced this is worth doing. > > The placeholders and the numeric_limits members are all inline > variables for C++17 and later, and C++17 is the compiler's default > mode. The placeholders aren't even required to exist for freestanding > prior to C++23. For the numeric_limits definitions, I suppose it is a > problem that users can't take their address in freestanding today > unless they compile as C++17. > >> and allows users to mess about with linker flags less. > > i.e. they don't have to use -nostdlib and/or link with gcc -lsupc++, > but can just use g++? > > That seems more compelling than providing definitions of the > placeholders and limits members. Indeed, with just a few more changes that I didn't get the chance to polish up before S3 (setting the MATH_LIBRARY target macro to "" and disabling linking crt0 when building --without-headers =2D-without-newlib), and the other patches I did submit, I could get a freestanding test program building with just -nolibc: i686-elf-g++ -ffreestanding -ggdb3 -O2 -fno-omit-frame-pointer \ -std=3Dgnu++20 -T ../linkscript.ld -nolibc \ -Wl,-z,max-page-size=3D0x1000 -o frello frello-main.o frello-abort.o \ -frello-support.o frello-memory.o frello-logging.o frello-assert.o \ frello-entry.o Most of these flags serve unrelated purposes, and the linker script is the default one for this configuration, with some sections shifted about. Have a great evening! =2D-=20 Arsen Arsenovi=C4=87 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOYEARYKAI4WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCY3PaFF8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0RkVF MkIzRDExM0ZDMDBBMzE2MkQ2MDYxNTJDMjk0MzAxRUEyQzQ5MxAcYXJzZW5AYWFy c2VuLm1lAAoJEFLClDAeosSTN+IA/A7CFkf3VgRUTfar0GAYtocGW0ge61UXod1T 19lJmaBPAQD/16y+9C7s0DqxTGIjJdql3a4Z1Stc3PL3JYZJegr5DA== =8GJP -----END PGP SIGNATURE----- --=-=-=--