From 436a257c50de2b885a6483af3c708c289e7d986f Mon Sep 17 00:00:00 2001 From: Mat Cross Date: Sun, 22 Aug 2021 10:21:16 +0100 Subject: [PATCH] Comments on nagfor options setup. --- mesonbuild/compilers/fortran.py | 1 + mesonbuild/linkers/linkers.py | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py index 1a430a7ae..07580114e 100644 --- a/mesonbuild/compilers/fortran.py +++ b/mesonbuild/compilers/fortran.py @@ -494,6 +494,7 @@ class NAGFortranCompiler(FortranCompiler): is_cross, info, exe_wrapper, linker=linker, full_version=full_version) self.id = 'nagfor' + # Warnings are on by default; -w disables (by category): self.warn_args = { '0': ['-w=all'], '1': [], diff --git a/mesonbuild/linkers/linkers.py b/mesonbuild/linkers/linkers.py index 58e432400..7523a8141 100644 --- a/mesonbuild/linkers/linkers.py +++ b/mesonbuild/linkers/linkers.py @@ -1047,7 +1047,14 @@ class QualcommLLVMDynamicLinker(LLVMDynamicLinker): class NAGDynamicLinker(PosixDynamicLinkerMixin, DynamicLinker): - """NAG Fortran linker, ld via gcc indirection.""" + """NAG Fortran linker, ld via gcc indirection. + + Using nagfor -Wl,foo passes option foo to a backend gcc invocation. + (This linking gathers the correct objects needed from the nagfor runtime + system.) + To pass gcc -Wl,foo options (i.e., to ld) one must apply indirection + again: nagfor -Wl,-Wl,,foo + """ id = 'nag'