summaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorAbdul Basit Ijaz <abdul.b.ijaz@intel.com>2022-05-31 16:43:43 +0200
committerNils-Christian Kempke <nils-christian.kempke@intel.com>2022-05-31 16:44:53 +0200
commit7c07eaec49caa6599401e3f27a23ee37862ed7b2 (patch)
tree49a9735d494ea071718b4da7d2ba537452f25f6d /gdb/testsuite
parentcffe02acaa8396d46aa90831dede24cdd6095ba0 (diff)
gdb/testsuite: Use -module option for Intel Fortran compilers
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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/lib/gdb.exp6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 746f0cf779..6fbf74442c 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -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}"
}
}