From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by sourceware.org (Postfix) with ESMTPS id 4718A3858D38; Tue, 19 Dec 2023 08:02:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4718A3858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4718A3858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702972968; cv=none; b=URqUSqyAWVkaXv2nIQtkzKxEUPaQ+hv4vVjXNu+tVw4JoCA883534KJdJbTnM/OYqnn/Jxwe6YOpPGdswY4qclpFoMP7PNZI0rOiVqEkZqqZ1QwdhES0TE1gS3A9QlOFkiupZZBdjdekbQ4a3mlCBKh6+t904K1+7361Qhvxq2k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702972968; c=relaxed/simple; bh=aNQo6VKA86PAR5ZQIRcRMDws+epdubr2Lnzg7YeJ7oM=; h=DKIM-Signature:From:Mime-Version:Subject:Message-Id:Date:To; b=hXZmtXjW7VK4UKUKSQap1O1ElbhjSfDdtn+XPy/M3AKQVAQicN3lxfCoZWWAGw88lUtaCTmJX8TJ1ql4vPX2A6uhEoI45lI8AMw60VKYP7QaV6x37CIKOtU4lGoN6C61JZv8dH5ah2g11TzTsrGThc6vSfk4qEaXAd6FM0ZBxqE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-40c317ba572so10453485e9.0; Tue, 19 Dec 2023 00:02:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702972957; x=1703577757; darn=gcc.gnu.org; h=to:cc:date:message-id:subject:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=vjjVhP9wClvSCxxfu49nafrTickgyH+PUifr+ifE3fY=; b=e2KNfsn0INWYPN1TjHzOIm6jcjNlD4/MFiu+AirIqmcfGPMj8QwmURox7Kcsk9I+vB leGLdQe5NDnT7NlESDfTaqFeOBgbobJMsFdqZH+GcQdiVdW71pO02L/s9ZE3XIARUhRc 8ICMA9dZHDIhCjtX8+AYxvjV1ZOnNi83b5zeZF8ZKOJ7ulFUZxr1zsDS5moBTGPX+67S hm96b36k956WbttTwFnroXMuYGCod7AAS4tfJ6PJua1UQrfVvv14AdYbsB3D61ZqpI9v lPuPhmVm6XxQrtNhLFLfwOiW7+RrxZBP0ggOmCmTuWvNJ7aTBNp+/R2cR0JP5tFVkw/K NAhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702972957; x=1703577757; h=to:cc:date:message-id:subject:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=vjjVhP9wClvSCxxfu49nafrTickgyH+PUifr+ifE3fY=; b=JC1hmY3VcC+krttKeYOHF6w8YEpr6RcEOwxD/pCJziIMZWeD1Csh7bzFH/D4++bPW4 e0semJFrcQ5YFWlALpgJwOlWbNA2vKnpbHnyxwzfcfZtPTnMMpbpo31yewUkHd3UxBUl GAm2U4CDOQq3+T0rCVu9Z7kgmrqmxvcZPaHnOj5AXFp0tyKJgS2agsWY6vXk/7MFsaJa 9/dqFu6Wslp1Cfe3IFGxu/0xrSqrlyfHvdGgcCDW0u6W0szPJxzlsQUd3xBrFkkQ0YDS PG3UsjJMSKrMGmM7HVPlQ39yEIqTDekbecJPnrfO3LDWc2vVx3bYpXYWeuCQ6vWeCaD6 j18g== X-Gm-Message-State: AOJu0YzxYzCrdwdjLtWadGFU3odQOkDG3IFvPKD454gKKqXchFJpxP93 21H778a84HDZJsMBtEV76McA9OGoimU= X-Google-Smtp-Source: AGHT+IGn7dK9Id9R+BVz0MVENcvpvm1xp2t2c/B4fPsEp0nLqKxO/BMIOtV2LXI8tz2eYuIXoMMhjQ== X-Received: by 2002:a5d:404c:0:b0:336:74f3:3866 with SMTP id w12-20020a5d404c000000b0033674f33866mr277465wrp.5.1702972956705; Tue, 19 Dec 2023 00:02:36 -0800 (PST) Received: from smtpclient.apple (chp127.enscp.fr. [193.51.253.127]) by smtp.gmail.com with ESMTPSA id l17-20020a5d4bd1000000b00336607f6630sm7693959wrt.47.2023.12.19.00.02.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Dec 2023 00:02:36 -0800 (PST) From: FX Coudert Content-Type: multipart/mixed; boundary="Apple-Mail=_C6B7C172-09D0-45DA-B81C-A3CCE3123A7A" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) Subject: [PATCH] libgfortran: avoid duplicate libraries in spec Message-Id: <2DEF0EE4-2C93-4195-AAE3-7A188CADC0E6@gmail.com> Date: Tue, 19 Dec 2023 09:02:23 +0100 Cc: GCC Patches , "ro@cebitec.uni-bielefeld.de " , Iain Sandoe To: fortran@gcc.gnu.org X-Mailer: Apple Mail (2.3774.300.61.1.2) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 List-Id: --Apple-Mail=_C6B7C172-09D0-45DA-B81C-A3CCE3123A7A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 When gfortran invokes the linker, it reads the linking spec from = libgfortran. This ends up doing things like: -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc where you can see that libgcc (both -lgcc and -lgcc_s) is linked in = twice. This wasn=E2=80=99t a problem, until the new macOS linker, which = gives a warning for this: the warning is innocuous, but having a warning = for every time you call gfortran for linking clutters the terminal, and = makes all the testsuite fail. And linking twice is superfluous, so = removing it will not be a problem. I am the author of the original commit to the spec, in 2010, but = honestly I have no memory: I think I vaguely remember saying =E2=80=9Cbett= er safe than sorry=E2=80=9D, but 13 years later it could just be a false = memory ;) Anyway, this was tested on x86_64-darwin and x64_86-linux, as well as = *-*-solaris2.11 by Rainer. OK to commit? (seems admissible in stage 3 because it fixes regtesting = on darwin22 and darwin23). FX libgfortran/ChangeLog: PR libfortran/110651 * libgfortran.spec.in: Remove duplicate libraries. --- libgfortran/libgfortran.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --Apple-Mail=_C6B7C172-09D0-45DA-B81C-A3CCE3123A7A Content-Disposition: attachment; filename=0001-libgfortran-avoid-duplicate-libraries-in-spec.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-libgfortran-avoid-duplicate-libraries-in-spec.patch" Content-Transfer-Encoding: quoted-printable =46rom=20e06aa9670dda36b141e3c67bf11ad743f59a6370=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Francois-Xavier=20Coudert=20= =0ADate:=20Mon,=2018=20Dec=202023=2016:17:22=20= +0100=0ASubject:=20[PATCH]=20libgfortran:=20avoid=20duplicate=20= libraries=20in=20spec=0A=0AThe=20linking=20of=20libgcc=20is=20already=20= present=20in=20%(liborig),=20so=20the=20current=0Asituation=20duplicates=20= libraries.=20This=20was=20not=20an=20issue=20until=20macOS's=20new=0A= linker=20started=20giving=20warnings=20for=20such=20cases.=0A=0A= libgfortran/ChangeLog:=0A=0A=09PR=20libfortran/110651=0A=09*=20= libgfortran.spec.in:=20Remove=20duplicate=20libraries.=0A---=0A=20= libgfortran/libgfortran.spec.in=20|=202=20+-=0A=201=20file=20changed,=20= 1=20insertion(+),=201=20deletion(-)=0A=0Adiff=20--git=20= a/libgfortran/libgfortran.spec.in=20b/libgfortran/libgfortran.spec.in=0A= index=20367d485c230..058ee5775bf=20100644=0A---=20= a/libgfortran/libgfortran.spec.in=0A+++=20= b/libgfortran/libgfortran.spec.in=0A@@=20-5,4=20+5,4=20@@=0A=20#=0A=20=0A= =20%rename=20lib=20liborig=0A-*lib:=20@LIBQUADSPEC@=20@LIBM@=20%(libgcc)=20= %(liborig)=0A+*lib:=20@LIBQUADSPEC@=20@LIBM@=20%(liborig)=0A--=20=0A= 2.39.3=20(Apple=20Git-145)=0A=0A= --Apple-Mail=_C6B7C172-09D0-45DA-B81C-A3CCE3123A7A--