gdb/testsuite: Use -J option when compiling Fortran tests
[deliverable/binutils-gdb.git] / gdb / testsuite / lib / gdb.exp
index 4682f5d2f8fe0ce0806f2fa844ce6417fd290d04..aa774462d25f51d2186eb98227350d18ca5544ed 100644 (file)
@@ -3719,6 +3719,16 @@ proc gdb_compile {source dest type options} {
     } else {
        set new_options [universal_compile_options]
     }
+
+    # Place (and look for) Fortran `.mod` files in the output
+    # directory for this specific test.
+    if {[lsearch -exact $options f77] != -1 \
+           || [lsearch -exact $options f90] != -1 } {
+       # Fortran compile.
+       set mod_path [standard_output_file ""]
+       lappend new_options "additional_flags=-J${mod_path}"
+    }
+
     set shlib_found 0
     set shlib_load 0
     set getting_compiler_info 0
This page took 0.023853 seconds and 4 git commands to generate.