diff options
author | Joel Brobecker <brobecker@adacore.com> | 2022-05-24 12:51:42 -0700 |
---|---|---|
committer | Joel Brobecker <brobecker@adacore.com> | 2022-05-24 12:51:42 -0700 |
commit | 0aee03cb638c262846f55477b40828f694c846a0 (patch) | |
tree | d24daf5716ef7ff0769dcbc83912a4606e9b3da8 /gcc/testsuite/gcc.misc-tests | |
parent | 72f76540ad0e7185d4f516e781e8bead13ebc170 (diff) | |
download | gcc-0aee03cb638c262846f55477b40828f694c846a0.zip gcc-0aee03cb638c262846f55477b40828f694c846a0.tar.gz gcc-0aee03cb638c262846f55477b40828f694c846a0.tar.bz2 |
gcc.misc-tests/outputs.exp: Use link test to check for -gsplit-dwarf support
We have noticed that, when running the GCC testsuite on AArch64
RTEMS 6, we have about 150 tests failing due to a link failure.
When investigating, we found that all the tests were failing
due to the use of -gsplit-dwarf.
On this platform, using -gsplit-dwarf currently causes an error
during the link:
| /[...]/ld: a.out section `.unexpected_sections' will not fit
| in region `UNEXPECTED_SECTIONS'
| /[...]/ld: region `UNEXPECTED_SECTIONS' overflowed by 56 bytes
The error is a bit cryptic, but the source of the issue is that
the linker does not currently support the sections generated
by -gsplit-dwarf (.debug_gnu_pubnames, .debug_gnu_pubtypes).
This means that the -gsplit-dwarf feature itself really isn't
supported on this platform, at least for the moment.
This commit enhances the -gsplit-dwarf support check to be
a compile-and-link check, rather than just a compile check.
This allows it to properly detect that this feature isn't
supported on platforms such as AArch64 RTEMS where the compilation
works, but not the link.
Tested on aarch64-rtems, where a little over 150 tests are now
passing, instead of failing, as well as on x86_64-linux, where
the results are identical, and where the .log file was also manually
inspected to make sure that the use of the -gsplit-dwarf option
was preserved.
gcc/testsuite/ChangeLog:
* gcc.misc-tests/outputs.exp: Make the -gsplit-dwarf test
a compile-and-link test rather than a compile-only test.
Diffstat (limited to 'gcc/testsuite/gcc.misc-tests')
-rw-r--r-- | gcc/testsuite/gcc.misc-tests/outputs.exp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.misc-tests/outputs.exp b/gcc/testsuite/gcc.misc-tests/outputs.exp index bc1fbe4..afae735 100644 --- a/gcc/testsuite/gcc.misc-tests/outputs.exp +++ b/gcc/testsuite/gcc.misc-tests/outputs.exp @@ -36,8 +36,8 @@ gcc_parallel_test_enable 0 # having to deal with .dSYM directories, as long as -gsplit-dwarf is # not supported on platforms that use .dSYM directories. set gsplit_dwarf "-g -gsplit-dwarf" -if ![check_no_compiler_messages gsplitdwarf object { - void foo (void) { } +if ![check_no_compiler_messages gsplitdwarf executable { + int main (void) { return 0; } } "$gsplit_dwarf"] { set gsplit_dwarf "" } |