From patchwork Sun Aug 13 13:45:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 135032 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp2209756vqi; Sun, 13 Aug 2023 06:46:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEmaIm9JF+dfj9I0ypBq1Mvbr3WpDV6ThmqBHTTLjUilHLC9vaTMGGoGO2CkM8/N+fO3zYF X-Received: by 2002:a2e:99c6:0:b0:2b6:efcf:1463 with SMTP id l6-20020a2e99c6000000b002b6efcf1463mr4858741ljj.6.1691934367748; Sun, 13 Aug 2023 06:46:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691934367; cv=none; d=google.com; s=arc-20160816; b=UjWMKSvWAkiADM+rYeDWLDhCilS+eucIO8mPa6/hgHjYLrGgQGkNDc7lx4GRO2fsQ2 lO/47NnWOxPxOdoWk4bNqId3GZl1uUICTJmN++PCLod5V59xjs8s3lpzS8NYXUJlIFVe VceL06kD7GdmKCjMCRWZ32d7Xf36H73iVD23yAWxibyZxB6IVjzUZTzxM5dCHRyEiEGr qI+p3iRmH8P2HZGNLbIdkT3UHC9VTWymZ9n6WPXrWLoL1M72DSiVDaonzcDiLNtet1O+ BDJiRaxkElEe5uL3lAUizN/SHj8jRuZU//ApL7gDUEuP3N9I2wjGH88NiWkm8VAosCuQ rFYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=RXjIstb3JyzUn3x19KhcuCShmMb04acXd4qOkCuqN8k=; fh=PKfDx7vVKQgI7IW9ntx/IwGCjS/MRp4+lVRSSh/v4yQ=; b=sIuoqgR838/4RheH1XLklHHw4a3KlcMtSga4hu0ihNIDr8S8FVaBTTh+5vVqRIMeOI FYRzfwRqFia5/iJoHqWFsnbcs7xkqVYahCEptgLPAC237WelyWR0I0XMBoieS8rucNUO +6nGrKxsgvlBu6+gUj7xr2GmrGFb8A/zEJJxwm5T37DxYfNQvaxEmYt3cmvIiVIEIgQS OO0r6+IfTVBIn+nFzWX/mvMaVcf2Lgom8QaasA9ilN0jlxveJDkxuVQxnuK7lQYbahtM daDbC3UCc8fengMXDurohXTwwUjv+H29IL+EvFzeDvXBnARHYaIkw4fcedi42Bs8QHi3 7orQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=belBoUl9; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id x13-20020a170906804d00b0099cbccaed7dsi6421316ejw.905.2023.08.13.06.46.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Aug 2023 06:46:07 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=belBoUl9; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6AEC03858C2D for ; Sun, 13 Aug 2023 13:46:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6AEC03858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691934366; bh=RXjIstb3JyzUn3x19KhcuCShmMb04acXd4qOkCuqN8k=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=belBoUl9gr+b2WwpmdKlb1YlikH4FzkpyUwiUE2RNfujRdI4dwUQGYifpCAPLLKLX PaFrNpiy+i8b057zBRrc6AaUeCmQ5FviifC1/4amdaQaXqu5KEVANHJSQOMg1Zy8IU rO2MvfFSAu3UfTGxJDeaMh8SJKxrpcFUqW7N52NE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id C89AF3858D32 for ; Sun, 13 Aug 2023 13:45:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C89AF3858D32 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3fe8a1591c7so20257065e9.3 for ; Sun, 13 Aug 2023 06:45:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691934322; x=1692539122; h=content-transfer-encoding:mime-version:reply-to:message-id:date :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=RXjIstb3JyzUn3x19KhcuCShmMb04acXd4qOkCuqN8k=; b=MkQiw9L8h5qXsdXpDc/AxrymoSc8izKqTK26Kv6QfRYLMjP3hyls2+lwv6j3jROLnm z4nQE+ovj1n5pObEx33j3L/RMzoNlH1FV44pS/8r+nIGRRbyAEwlkAAZX/fQiFm2MqAv zfPjy0vHST4rZqsMvxIRzBq8VfuESXgGKVLjxuACawdZAnQyGlx3/qJNDlEtIftn/OIv kX/9g0T9bhPGY4u3IvvQbDyI7CFiq5QBg32viBArwy/giKINJizak9cAur44f6/qiDul pAaZr+5izQWQ5iZstYJh+bYODry8hNgLrlgmnhWYHMNk8N1+G05EkUjVTlCxF7VjDQg3 s/oA== X-Gm-Message-State: AOJu0Yx2lwqPtWWe3S4DLRdYKNysmV4sdKZDYghQ9ywCFD3mm+aSh4cW LoDaJKpkLLcAcMIThl85Twy19oaWaAc= X-Received: by 2002:a1c:6a14:0:b0:3fe:687a:abb8 with SMTP id f20-20020a1c6a14000000b003fe687aabb8mr5831875wmc.7.1691934321430; Sun, 13 Aug 2023 06:45:21 -0700 (PDT) Received: from localhost.localdomain (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.gmail.com with ESMTPSA id f2-20020a7bcd02000000b003fe210d8e84sm14351690wmj.5.2023.08.13.06.45.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 13 Aug 2023 06:45:20 -0700 (PDT) X-Google-Original-From: Iain Sandoe To: gcc-patches@gcc.gnu.org Subject: [pushed] modula-2, plugin: Fix Darwin bootstrap issues. Date: Sun, 13 Aug 2023 14:45:15 +0100 Message-Id: <20230813134515.12498-1-iain@sandoe.co.uk> X-Mailer: git-send-email 2.39.2 (Apple Git-143) MIME-Version: 1.0 X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Iain Sandoe via Gcc-patches From: Iain Sandoe Reply-To: iain@sandoe.co.uk Cc: Iain Sandoe , gaiusmod2@gmail.com Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774121771242011903 X-GMAIL-MSGID: 1774121771242011903 Tested on x86_64 Darwin and x86_64 Linux, pushed to master, will also backport to 13 if it is needed there, thanks Iain --- 8< --- This corrects some typos in the suffix of the m2rte pluing that lead to a bootstrap fail on Darwin, where the suffix is not '.so'. On some versions of Darwin, the linker complains if libSystem is not linked, so we disable all the default libs, but add libc back. Signed-off-by: Iain Sandoe gcc/m2/ChangeLog: * Make-lang.in: Update suffix spellings to use 'soext'. Add libc to the plugin link. --- gcc/m2/Make-lang.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in index 8c6bac229e7..ca1581fe643 100644 --- a/gcc/m2/Make-lang.in +++ b/gcc/m2/Make-lang.in @@ -39,6 +39,7 @@ else PLUGINLDFLAGS = -Wl,-undefined,dynamic_lookup PLUGINLDFLAGS += -Wl,-install_name,m2rte$(soext) PLUGINLDFLAGS += -nodefaultlibs + PLUGINLDFLAGS += -lc endif TEXISRC = $(srcdir)/doc/gm2.texi \ @@ -91,7 +92,7 @@ PGE=m2/pge$(exeext) SRC_PREFIX=G ifeq ($(enable_plugin),yes) -M2RTE_PLUGIN_SO=plugin/m2rte$(exeext).so +M2RTE_PLUGIN_SO=plugin/m2rte$(soext) endif m2/gm2spec.o: $(srcdir)/m2/gm2spec.cc $(SYSTEM_H) $(GCC_H) $(CONFIG_H) \ @@ -420,7 +421,7 @@ plugin/m2rte$(soext): $(srcdir)/m2/plugin/m2rte.cc $(GCC_HEADER_DEPENDENCIES_FOR else m2.install-plugin: -plugin/m2rte$(exeext).so: +plugin/m2rte$(soext): endif