public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/110651] New: libgfortran.spec links twice with libgcc spec
@ 2023-07-13 9:22 ro at gcc dot gnu.org
2023-07-13 9:22 ` [Bug libfortran/110651] " ro at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: ro at gcc dot gnu.org @ 2023-07-13 9:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110651
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:
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) %(liborig)
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
the original patch that introduced libgfortran.spec.in:
commit 1ec601bf9fb0fbc39b3a6cb90450500f857adae8
Author: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Date: Tue Nov 16 21:23:19 2010 +0000
re PR fortran/32049 (Support on x86_64 also kind=16)
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/110651] libgfortran.spec links twice with libgcc spec
2023-07-13 9:22 [Bug libfortran/110651] New: libgfortran.spec links twice with libgcc spec ro at gcc dot gnu.org
@ 2023-07-13 9:22 ` ro at gcc dot gnu.org
2023-07-13 9:30 ` iains at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ro at gcc dot gnu.org @ 2023-07-13 9:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110651
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/110651] libgfortran.spec links twice with libgcc spec
2023-07-13 9:22 [Bug libfortran/110651] New: libgfortran.spec links twice with libgcc spec ro at gcc dot gnu.org
2023-07-13 9:22 ` [Bug libfortran/110651] " ro at gcc dot gnu.org
@ 2023-07-13 9:30 ` iains at gcc dot gnu.org
2023-07-13 9:34 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: iains at gcc dot gnu.org @ 2023-07-13 9:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110651
--- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Rainer Orth from comment #0)
> When bootstrapping current trunk on macOS 14.0 beta 3 with Xcode 15 beta 4,
> every single fortran link test FAILs like
> * Get rid of %(libgcc) in libgfortran.spec.in.
>
> * Include it conditionally depending on a configure test.
Hmm .. I thought we already had configure tests to customise the spec for
Darwin?
FX?
> * 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.
I think we need to fix the specs not work around with disabled warnings.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/110651] libgfortran.spec links twice with libgcc spec
2023-07-13 9:22 [Bug libfortran/110651] New: libgfortran.spec links twice with libgcc spec ro at gcc dot gnu.org
2023-07-13 9:22 ` [Bug libfortran/110651] " ro at gcc dot gnu.org
2023-07-13 9:30 ` iains at gcc dot gnu.org
@ 2023-07-13 9:34 ` ro at CeBiTec dot Uni-Bielefeld.DE
2023-07-21 11:39 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2023-07-13 9:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110651
--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> ---
> (In reply to Rainer Orth from comment #0)
>> When bootstrapping current trunk on macOS 14.0 beta 3 with Xcode 15 beta 4,
>> every single fortran link test FAILs like
>
>> * Get rid of %(libgcc) in libgfortran.spec.in.
>>
>> * Include it conditionally depending on a configure test.
>
> Hmm .. I thought we already had configure tests to customise the spec for
> Darwin?
> FX?
We do: @LIBM@ is handled that way.
>> * 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.
>
> I think we need to fix the specs not work around with disabled warnings.
Agreed: for me modifying the spec was a quick hack to avoid half the
failures in the testsuite run.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/110651] libgfortran.spec links twice with libgcc spec
2023-07-13 9:22 [Bug libfortran/110651] New: libgfortran.spec links twice with libgcc spec ro at gcc dot gnu.org
` (2 preceding siblings ...)
2023-07-13 9:34 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2023-07-21 11:39 ` ro at CeBiTec dot Uni-Bielefeld.DE
2023-12-19 8:17 ` fxcoudert at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2023-07-21 11:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110651
--- Comment #3 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot
> Uni-Bielefeld.DE> ---
>> --- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> ---
>> (In reply to Rainer Orth from comment #0)
>>> When bootstrapping current trunk on macOS 14.0 beta 3 with Xcode 15 beta 4,
>>> every single fortran link test FAILs like
>>
>>> * Get rid of %(libgcc) in libgfortran.spec.in.
>>>
>>> * Include it conditionally depending on a configure test.
>>
>> Hmm .. I thought we already had configure tests to customise the spec for
>> Darwin?
>> FX?
>
> We do: @LIBM@ is handled that way.
FWIW, I've now removed the %(libgcc) from libgfortran.spec.in locally:
on all of *-*-solaris2.11, x86_64-pc-unix-gnu, and
x86_64-apple-darwin23.0.0 there were no regressions.
It seems ever more important to understand why it was introduced in the
first place, before even considering adding it conditionally.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/110651] libgfortran.spec links twice with libgcc spec
2023-07-13 9:22 [Bug libfortran/110651] New: libgfortran.spec links twice with libgcc spec ro at gcc dot gnu.org
` (3 preceding siblings ...)
2023-07-21 11:39 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2023-12-19 8:17 ` fxcoudert at gcc dot gnu.org
2024-02-10 15:48 ` iains at gcc dot gnu.org
2024-02-11 13:53 ` fxcoudert at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2023-12-19 8:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110651
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-12-19
URL| |https://gcc.gnu.org/piperma
| |il/gcc-patches/2023-Decembe
| |r/640943.html
Ever confirmed|0 |1
--- Comment #4 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
I introduced the original behaviour and I'm not sure I remember why. I've
propose to remove the duplication, because I cannot see a single case where it
could be useful. Patch posted at
https://gcc.gnu.org/pipermail/gcc-patches/2023-December/640943.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/110651] libgfortran.spec links twice with libgcc spec
2023-07-13 9:22 [Bug libfortran/110651] New: libgfortran.spec links twice with libgcc spec ro at gcc dot gnu.org
` (4 preceding siblings ...)
2023-12-19 8:17 ` fxcoudert at gcc dot gnu.org
@ 2024-02-10 15:48 ` iains at gcc dot gnu.org
2024-02-11 13:53 ` fxcoudert at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: iains at gcc dot gnu.org @ 2024-02-10 15:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110651
--- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> ---
AFAICT, this was fixed on trunk by r14-6721-gd31c54c7da7661 (which seems to
have a reference to the PR so not sure why it did not show up here).
I think we need this on any open branch which we want to work with macOS14+.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/110651] libgfortran.spec links twice with libgcc spec
2023-07-13 9:22 [Bug libfortran/110651] New: libgfortran.spec links twice with libgcc spec ro at gcc dot gnu.org
` (5 preceding siblings ...)
2024-02-10 15:48 ` iains at gcc dot gnu.org
@ 2024-02-11 13:53 ` fxcoudert at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2024-02-11 13:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110651
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Didn't have any fallout reported, so let's go.
Backported to 13 as
https://gcc.gnu.org/git?p=gcc.git;a=commit;h=0ea5efea8f24e182b17c7f4f2e3923a2938a2de3
Backported to 12 as
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=56071adae867e63248816f5879339eec27785383
Backported to 11 as
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=407100bffa8c66e92fd4f6bfd2a083995b9dab93
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-02-11 13:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-13 9:22 [Bug libfortran/110651] New: libgfortran.spec links twice with libgcc spec ro at gcc dot gnu.org
2023-07-13 9:22 ` [Bug libfortran/110651] " ro at gcc dot gnu.org
2023-07-13 9:30 ` iains at gcc dot gnu.org
2023-07-13 9:34 ` ro at CeBiTec dot Uni-Bielefeld.DE
2023-07-21 11:39 ` ro at CeBiTec dot Uni-Bielefeld.DE
2023-12-19 8:17 ` fxcoudert at gcc dot gnu.org
2024-02-10 15:48 ` iains at gcc dot gnu.org
2024-02-11 13:53 ` fxcoudert at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).