From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id 5116C385B506 for ; Thu, 5 Jan 2023 02:33:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5116C385B506 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-x32c.google.com with SMTP id p1-20020a05600c1d8100b003d8c9b191e0so316409wms.4 for ; Wed, 04 Jan 2023 18:33:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=nEEOSNIZsU6+6uRA8bA5R921+dJBkMa9eZipvdOJ25Y=; b=pmj9rilURW2DEkAKopdwn51UDIJogDJlb0e7qVK4pQeYjkaVHYTO9KTUKTkqD0nWFj xiy5O4425CdwfbbAXiZg4Xnc4Jx73xl7n7HfJqx13XquspILxtdldV9xlVqYxN6hP5Td zSdKVV5uAVzGN9DmrPRYd7Fls0i36PQiVU04ZuHy82JarpAHyHAnNkuwU2AZis8Lhqjj fMimXrylrdFNFnOBkKbcgLUhqhQO4gxhmMNPfEu4yP73PHptkp8c0WCkfeX9vXX7AnLX djbqIX31HlZqffM7SbyPPZ/7EKh/5OvGohlUH6Z4K7+QQdgPvbNB1zrm4yAQdAeok9qE iZ8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=nEEOSNIZsU6+6uRA8bA5R921+dJBkMa9eZipvdOJ25Y=; b=IDySXsusT97PW4q+5hWyoO3bvLiG4ZVJxsXAiocyXRcWQXmcTm/tEgZk/5ArJkK/a9 s77nXRN8wZ8yM2s+p0mMJsEMVHZJXDT6hlMuoO/NaQMbPvI40WCFLkZoQxEWJA7+ljhB OK/Z/98Z0ElajKKOixfDdUNupAWz5PeLhD1M7MmC/rpEWpgT+cWySjVR8uNUGPyMqVBY rjlaE7mn+hXGKor/hoVadpxPhtN9G/ipP+C1xeIUDusgeh6Y66c8QJsQkSCfSYHYaqwq FLlttHYSqbioB5Uc8LzNf9xTrmgoBFsk9CiFq+2boaXDXnCZVbGYuTQGeih3Ur43BMvh tzYg== X-Gm-Message-State: AFqh2kpT30CvUP3MehvKthYD2rQgi7UBaxxvpLMpOneSH3nardQNz6Io AfwwBft6Xcj43hfv8V6R+y8= X-Google-Smtp-Source: AMrXdXvkg8As3TpnMB8FzCNKV+HwFbuk6PF3GKgDSrud9WgdJm0GAI8/uBpCs7/ECmOl59yZ4v55qQ== X-Received: by 2002:a05:600c:1c2a:b0:3d2:3376:6f2e with SMTP id j42-20020a05600c1c2a00b003d233766f2emr36090771wms.9.1672886035927; Wed, 04 Jan 2023 18:33:55 -0800 (PST) Received: from lancelot ([195.147.220.46]) by smtp.gmail.com with ESMTPSA id m42-20020a05600c092a00b003d9a3a0d461sm654992wmp.4.2023.01.04.18.33.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 18:33:55 -0800 (PST) Received: from gaius by lancelot with local (Exim 4.94.2) (envelope-from ) id 1pDG4o-00FgSe-3U; Thu, 05 Jan 2023 02:33:54 +0000 From: Gaius Mulley To: Iain Sandoe Cc: GCC Patches Subject: Re: [PATCH 4/n] modula-2, driver: Handle static-libstd++ for targets without static/dynamic References: <20221230105821.61331-1-iain@sandoe.co.uk> Date: Thu, 05 Jan 2023 02:33:54 +0000 In-Reply-To: (Iain Sandoe's message of "Fri, 30 Dec 2022 11:00:23 +0000") Message-ID: <87o7rdpv59.fsf@debian> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,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: Iain Sandoe writes: > Oops pressed =E2=80=98send' too soon - this is part of the series for Dar= win: > > There are several modula-2 issues on Darwin, some blocking bootstrap on > one or more system versions. > > This has been tested on powerpc/i688-darwin9 .. x86_64-darwin10,17,21 and > the prototype aarch64-darwin branch on darwin21. > > OK for trunk? > thanks > Iain sure, LGTM regards, Gaius >> On 30 Dec 2022, at 10:58, Iain Sandoe wrote: >>=20 >> The follows the pattern used in C++ and D drivers to pass -static-libstd= c++ >> onto the target driver to allow spec substitution of static libraries. >>=20 >> NOTE: The general handling of Bstatic/dynamic and the possible use of st= atic >> libgm2 libraries is unimplemented in this driver so far. It seems likely >> that the driver construction could be greatly simplified if the modula-2 >> runtimes were combined into fewer (hopefully, one) libraries. >>=20 >> Signed-off-by: Iain Sandoe >>=20 >> gcc/m2/ChangeLog: >>=20 >> * gm2spec.cc (lang_specific_driver): Pass -static-libstdc++ on to >> the target driver if the linker does not support Bstatic/dynamic. >> --- >> gcc/m2/gm2spec.cc | 5 +++++ >> 1 file changed, 5 insertions(+) >>=20 >> diff --git a/gcc/m2/gm2spec.cc b/gcc/m2/gm2spec.cc >> index 680dd3602ef..b9a5c4e79bb 100644 >> --- a/gcc/m2/gm2spec.cc >> +++ b/gcc/m2/gm2spec.cc >> @@ -767,7 +767,12 @@ lang_specific_driver (struct cl_decoded_option **in= _decoded_options, >>=20 >> case OPT_static_libstdc__: >> library =3D library >=3D 0 ? 2 : library; >> +#ifdef HAVE_LD_STATIC_DYNAMIC >> + /* Remove -static-libstdc++ from the command only if target supports >> + LD_STATIC_DYNAMIC. When not supported, it is left in so that a >> + back-end target can use outfile substitution. */ >> args[i] |=3D SKIPOPT; >> +#endif >> break; >>=20 >> case OPT_stdlib_: >> --=20 >> 2.37.1 (Apple Git-137.1) >>=20