From patchwork Thu Jul 13 09:07:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 119699 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1691296vqm; Thu, 13 Jul 2023 02:09:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlET6MuhFP/hHCXG9i7j9EwCfJ1F4ouHXp0vTqW12aL95X+smnnHh8c2XHUYTL3TB+wyzkt2 X-Received: by 2002:a05:6402:648:b0:51a:265a:8fca with SMTP id u8-20020a056402064800b0051a265a8fcamr1224444edx.27.1689239382103; Thu, 13 Jul 2023 02:09:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689239382; cv=none; d=google.com; s=arc-20160816; b=DEfexni77GghpQIkxyjGaostbsB+ZDOCGNIvnZXw5ALxv0lWHTTMtYgrXbwxEP1DXP 2oldtm80mA8hwEPk76Xysp2HbhrmVgFo/I7wT7Vgk6v5eq0dVN8J9vfSoisw2A/zmXOM 2O3Fi3ARWSmi3JhQFGt83r+Yxz/shoNVUyWOPuAmLhPyn7gLWCKtQuiq8K0Fdc79oO/b Rbe7oTIiv2eqr70rG6NLGolt+nGe+P1Y5RYhpdRPRAAqhuqa2KAoiMrl4GYkcFdGNxNY VB2+eNretKZjMTGeRZK9/Wz37ZfxAZEyzIAa+W+9k3YqCg7X4NSxeUO40/pTQBJVqyNz 1JJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:user-agent :message-id:date:subject:cc:to:from:dkim-signature:dmarc-filter :delivered-to; bh=fZ2OoAWfHHvsGDQPV+YdLeuG408lYnTHrcO8N44RKls=; fh=wa9xvQ4cMp8zMrmNyeOXYdAHp7wGoPYtlXOIrtlh4bM=; b=Qim696hyf7z7pHgi+lbh+lutN6JmkJVPLgFLZmPWQ0ijU66FetIcloS/2/zIo6ZR2s 3BvNjGGsTaZVI6XxvH9QolAPn89nRUKMJsLjTvZ63YY/s8FTVrYr8mrj0vwn3rDE+fHu x3Utqg3m/jZig5X0gbA7n95VKbzgSecpWlpNn50X01W1KE3JaINc8WUpelTi8OD311Do 5cy3CDequ+E0H9ve7DO0PFpni38237RNh/1YozSVn6BWDc5+I+Fex5pcFdLNugtRz+Fw HrMImk63wDPfOhN3IKADbWO7m07cxn5NenoVW1eQuNeCl3jro6nYCIx+gX8jAavfRgXe deLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CeBiTec.Uni-Bielefeld.DE header.s=20200306 header.b=YFoMK1js; 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" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id u6-20020a05640207c600b0051df8ee23f5si6548394edy.175.2023.07.13.02.09.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jul 2023 02:09:42 -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=@CeBiTec.Uni-Bielefeld.DE header.s=20200306 header.b=YFoMK1js; 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 70958385C6F4 for ; Thu, 13 Jul 2023 09:07:51 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 736F73858C41 for ; Thu, 13 Jul 2023 09:07:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 736F73858C41 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 6A739ADE66; Thu, 13 Jul 2023 11:07:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NJFPtMxwe0TH; Thu, 13 Jul 2023 11:07:05 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p50855614.dip0.t-ipconnect.de [80.133.86.20]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 0190CAE2CE; Thu, 13 Jul 2023 11:07:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1689239225; bh=OUzvgFeE/xhDuAzg6K4l3Lgc1hqHCeBJuv7ozbEvePA=; h=From:To:Cc:Subject:Date:From; b=YFoMK1js+phq3YFhw0IcAtlpb7KXpO72YLr0R2MzAtGhkZyZq95++79C82Y3EYM76 Y46W+AdO2167jm2JL7/4mGZIUj5wpeCznTcdgRVYlOctTEYyMnEzPivsECho5erQgp Xkdc7d+WsO/V203gnEuNw286bJJQGb6uasyLkinKswVNStJo38r+kW5DAXpsSpwsY8 US4YSxOeeyAVUk8D1hahp2xNYCbhQIsUfB4AuRu8xCj1IW6TfF+q/Ykddw/YP22Dck yqQbyBSALYOJ6GUmXmDRNNNZqBfNtswTigO5F1Z9vD+6l3JCC5iveoUfK936d/pkXd QUkoZ+4ZWJ7CA== From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Gaius Mulley , Iain Sandoe Subject: [PATCH] m2, build: Use LDLFAGS for mklink Date: Thu, 13 Jul 2023 11:07:04 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 X-Spam-Status: No, score=-3792.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771295874336342792 X-GMAIL-MSGID: 1771295874336342792 When trying to bootstrap current trunk on macOS 14.0 beta 3 with Xcode 15 beta 4, the build failed running mklink in stage 2: unset CC ; m2/boot-bin/mklink -s --langc++ --exit --name m2/mc-boot/main.cc /vol/gcc/src/hg/master/darwin/gcc/m2/init/mcinit dyld[55825]: Library not loaded: /vol/gcc/lib/libstdc++.6.dylib While it's unclear to me why this only happens on macOS 14, the problem is clear: unlike other C++ executables, mklink isn't linked with -static-libstdc++ which is passed in from toplevel in LDFLAGS. This patch fixes that and allows the build to continue. Bootstrapped on x86_64-apple-darwin23.0.0, i386-pc-solaris2.11, and sparc-sun-solaris2.11. Ok for trunk? Rainer # HG changeset patch # Parent b4327a00f1cdf8ce96f0483bbac09cc5f6108218 m2: Use LDLFAGS for mklink diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in --- a/gcc/m2/Make-lang.in +++ b/gcc/m2/Make-lang.in @@ -1653,7 +1653,7 @@ m2/gm2-compiler-boot/gm2.a: m2/boot-bin/ m2/boot-bin/mklink$(exeext): $(srcdir)/m2/tools-src/mklink.c -test -d $(@D) || $(mkinstalldirs) $(@D) - $(CXX) $(CFLAGS) -I$(srcdir)/m2 -Im2/gm2-libs-boot -Im2/gm2-compiler-boot -I$(srcdir)/m2/mc-boot-ch $(INCLUDES) $< -o $@ + $(CXX) $(CFLAGS) $(LDFLAGS) -I$(srcdir)/m2 -Im2/gm2-libs-boot -Im2/gm2-compiler-boot -I$(srcdir)/m2/mc-boot-ch $(INCLUDES) $< -o $@ m2/gm2-compiler-boot/$(SRC_PREFIX)%.h: $(srcdir)/m2/gm2-compiler-boot/%.def $(MCDEPS) -test -d $(@D) || $(mkinstalldirs) $(@D)