]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb, testsuite: Handle unused compiler option fdiagnostics-color=never.
authorIjaz, Abdul B <abdul.b.ijaz@intel.com>
Tue, 19 Mar 2024 10:50:51 +0000 (11:50 +0100)
committerIjaz, Abdul B <abdul.b.ijaz@intel.com>
Thu, 16 May 2024 19:29:02 +0000 (21:29 +0200)
commit3396d197b7c27ce1ffae7b77a3b87da8b9a99942
treeac0f17e293357f1c11002c973fc7be96369a41bc
parent108f22e4ebf7cdb4909f468c4bd83dbe40ccd30b
gdb, testsuite: Handle unused compiler option fdiagnostics-color=never.

The 'univeral_compile_options' in gdb.exp file only verifies the support
of '-fdiagnostics-color=never' for the "C" source file.  So while running
tests with assembly source file (.s), many of them are not able to run
on icx/clang compilers because '-fdiagnostics-color=never' option is not
supported.  This problem is not seen for the ".S" assembly source files so
these files are not handled separately.  After this change, this function
is split into multiple functions to check the support for different type
of sources individually.

Before this change, in the case of clang and ICX compiler, this error is
shown for assembly source files (.s):

'''
icx -fdiagnostics-color=never -Wno-unknown-warning-option -fno-pie -c -O0 -o
amd64-entry-value0.o gdb/testsuite/gdb.arch/amd64-entry-value.s (timeout = 300)

icx: warning: argument unused during compilation: '-fdiagnostics-color=never'
[-Wunused-command-line-argument]

gdb compile failed, icx: warning: argument unused during compilation:
'-fdiagnostics-color=never' [-Wunused-command-line-argument]

UNTESTED: gdb.arch/amd64-entry-value.exp: failed to prepare
'''

Similarly this error is shown for the clang compiler:

'''
clang  -fdiagnostics-color=never -Wno-unknown-warning-option -fno-pie -c -O0
-o amd64-entry-value0.o gdb/testsuite/gdb.arch/amd64-entry-value.s

clang: warning: argument unused during compilation:
 '-fdiagnostics-color=never' [-Wunused-command-line-argument]
'''

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/lib/gdb.exp