Bug 31628 - [gdb/testsuite] Support different compiler versions for different languages
Summary: [gdb/testsuite] Support different compiler versions for different languages
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: testsuite (show other bugs)
Version: HEAD
: P2 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-10 16:11 UTC by Tom de Vries
Modified: 2024-04-11 07:03 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2024-04-10 16:11:27 UTC
I recently tried a testsuite run with the clang/clang++ compiler.

I ran into some failures in gdb.ada due to the use of test_compiler_info.

No language argument is specified because ada is not supported, but then the language defaults to c, meaning the compiler info test is done using clang but the compiler used is gnatmake.

I disregarded this, because the setup is a bit weird, but today I came across a machine on the gcc compile farm with gnatmake 10.5.0 and gcc 11.4.0, where I run into the exact same problem.

A solution could be to drop defaulting to c in test_compiler_info, but it's used in ~300 locations, so that could prove hard to fix manually.  Another approach would be to choose the default based on test dir, so ada in gdb.ada and so on.

Anyway, probably support for ada needs to be added in test_compiler_info regardless.
Comment 1 Tom de Vries 2024-04-11 07:03:53 UTC
I tried to work around this by using CC_FOR_TARGET etc.

But we have
- gcc-10 and gcc-11
- g++-11
- gfortran-11
- gnatmake-10
so I can't make a set that is consistent.