]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: Use -module option for Intel Fortran compilers
authorAbdul Basit Ijaz <abdul.b.ijaz@intel.com>
Tue, 31 May 2022 14:43:43 +0000 (16:43 +0200)
committerNils-Christian Kempke <nils-christian.kempke@intel.com>
Tue, 31 May 2022 14:44:53 +0000 (16:44 +0200)
The '-J' option is not supported in Intel compilers (ifx and ifort).
The Intel version of the flag is '-module' which serves the same purpose.

gdb/testsuite/lib/gdb.exp

index 746f0cf779ce62c0548d7b65496537c02cd0752e..6fbf74442c9ade9cdb8ef80e56a40d31093814e3 100644 (file)
@@ -4458,12 +4458,16 @@ proc gdb_compile {source dest type options} {
     }
 
     # Place (and look for) Fortran `.mod` files in the output
-    # directory for this specific test.
+    # directory for this specific test.  For Intel compilers the -J
+    # option is not supported so instead use the -module flag.
     if { [lsearch -exact $options f90] != -1 } {
        # Fortran compile.
        set mod_path [standard_output_file ""]
        if [test_compiler_info "gcc-*"] {
            lappend new_options "additional_flags=-J${mod_path}"
+       } elseif { [test_compiler_info {icc-*}]
+                  || [test_compiler_info {intel-*}] } {
+           lappend new_options "additional_flags=-module ${mod_path}"
        }
     }