From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0EFBB385842D; Thu, 13 Jul 2023 09:22:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0EFBB385842D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689240125; bh=97bZ5tMMr/j4YWqOH6FIKAukOEVVu7JdRR71yv9pj8k=; h=From:To:Subject:Date:From; b=j3WrG90fxA/Wksd2xs5ZrUYypnUy+AmDf3+XWQCS+t5zCkllmbnYrcJR9hkRMu8P8 k/J+c3e6dgUJSv9XQWr4zmGA3l/bvoulnOs3aLFq0hqBUP1R/CRZllyTA9tCPdzaXW bsga8tvxzdg3CYr9fdVejnHs/AdKqieiYq4tmYVs= From: "ro at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/110651] New: libgfortran.spec links twice with libgcc spec Date: Thu, 13 Jul 2023 09:22:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ro at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone cf_gcchost cf_gcctarget cf_gccbuild Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110651 Bug ID: 110651 Summary: libgfortran.spec links twice with libgcc spec Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org CC: burnus at gcc dot gnu.org, fxcoudert at gcc dot gnu.org, iains at gcc dot gnu.org Target Milestone: --- Host: x86_64-apple-darwin23.0.0 Target: x86_64-apple-darwin23.0.0 Build: x86_64-apple-darwin23.0.0 When bootstrapping current trunk on macOS 14.0 beta 3 with Xcode 15 beta 4, every single fortran link test FAILs like FAIL: gfortran.dg/c-interop/allocatable-dummy.f90 -O0 (test for excess errors) Excess errors:=20 ld: warning: ignoring duplicate library '-lemutls_w' ld: warning: ignoring duplicate library '-lgcc' The link line ends in -lgfortran -lemutls_w -lgcc -lquadmath -lemutls_w -lgcc -lSystem -no_compact_unwind -idsym -dsym I could trace this to libgfortran.spec, which has %rename lib liborig *lib: %{static-libquadmath:libquadmath.a%s;:-lquadmath} %(libgcc) %(libori= g) The libgcc spec is included twice, once explicitly here and another time in %(liborig). I have no idea why this is done this way: this already was in= =20 the original patch that introduced libgfortran.spec.in: commit 1ec601bf9fb0fbc39b3a6cb90450500f857adae8 Author: Francois-Xavier Coudert Date: Tue Nov 16 21:23:19 2010 +0000 re PR fortran/32049 (Support on x86_64 also kind=3D16) I see quite a number of possible solutions: * Get rid of %(libgcc) in libgfortran.spec.in. * Include it conditionally depending on a configure test. * Disable ld warnings with -w in the spec, probably using some @TARGET_LDFLAGS@. * Disable ld warnings globally in the Darwin driver code. That may be undisable since it would disable possibly benign warnings, too.=