On Wed, Apr 21, 2021 at 4:59 AM Bernhard Reutner-Fischer
<rep.dot....@gmail.com> wrote:
> 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.
> Which linker do you use, on which OS?

binutils 2.32 (stock build from source) on CentOS 7.

> If you use binutils, you can pass -Wl,--verbose to the compiler to
> instruct the linker to dump the linker script while linking. This should
> show where the -z comes from:
> gfortran foo.f90 -static-libgfortran -Wl,--verbose

I didn't do this per se, but I did gfortran -v, and saw that it was an
option to collect2.  I can try your method when the system is
available again tomorrow.

Reply via email to