On Wed, 21 Apr 2021 02:34:43 -0400
NightStrike via Fortran <fortran@gcc.gnu.org> wrote:
When linking with -static-libgfortran, I get warnings from ld of the form
"ld: warning: -z ignore ignored" and "ld: warning: -z record ignored". I
can't find those -z options documented anywhere. Why is gfortran adding
them?
-z are options to ld.
libgfortran/acinclude.m4 contains:
dnl Check whether -Wl,--as-needed resp. -Wl,-zignore is supported
That's where -z could come from. – Could you check what is in the
installed file libgfortran.spec? On my Linux, it has:
%{static-libgfortran:--as-needed}
If you have a '-z ignore' there, it would be interesting to understand
why – and what 'libgfortran/config.log' shows.
Which linker do you use, on which OS?
binutils 2.32 (stock build from source) on CentOS 7.
Here: Ubuntu with binutils 2.34.
Tobias
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank
Thürauf