* [RFA] gcc.misc-tests/outputs.exp: Use link test to check for -gsplit-dwarf support
@ 2022-04-25 16:04 Joel Brobecker
2022-05-16 17:23 ` [ping] " Joel Brobecker
0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2022-04-25 16:04 UTC (permalink / raw)
To: gcc-patches; +Cc: Joel Sherrill, Joel Brobecker
Hello,
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.
OK to push on master?
Thank you,
--
Joel
---
gcc/testsuite/gcc.misc-tests/outputs.exp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.misc-tests/outputs.exp b/gcc/testsuite/gcc.misc-tests/outputs.exp
index bc1fbe4eb7f..afae735e92d 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 ""
}
--
2.32.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ping] Re: [RFA] gcc.misc-tests/outputs.exp: Use link test to check for -gsplit-dwarf support
2022-04-25 16:04 [RFA] gcc.misc-tests/outputs.exp: Use link test to check for -gsplit-dwarf support Joel Brobecker
@ 2022-05-16 17:23 ` Joel Brobecker
2022-05-23 8:05 ` Richard Sandiford
0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2022-05-16 17:23 UTC (permalink / raw)
To: gcc-patches; +Cc: Joel Brobecker
Hello,
Gentle ping on this patch.
Thank you!
On Mon, Apr 25, 2022 at 09:04:51AM -0700, Joel Brobecker wrote:
> Hello,
>
> 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.
>
> OK to push on master?
>
> Thank you,
> --
> Joel
>
> ---
> gcc/testsuite/gcc.misc-tests/outputs.exp | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.misc-tests/outputs.exp b/gcc/testsuite/gcc.misc-tests/outputs.exp
> index bc1fbe4eb7f..afae735e92d 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 ""
> }
> --
> 2.32.0
>
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ping] Re: [RFA] gcc.misc-tests/outputs.exp: Use link test to check for -gsplit-dwarf support
2022-05-16 17:23 ` [ping] " Joel Brobecker
@ 2022-05-23 8:05 ` Richard Sandiford
2022-05-24 19:52 ` Joel Brobecker
0 siblings, 1 reply; 4+ messages in thread
From: Richard Sandiford @ 2022-05-23 8:05 UTC (permalink / raw)
To: Joel Brobecker via Gcc-patches; +Cc: Joel Brobecker
Joel Brobecker via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> Hello,
>
> Gentle ping on this patch.
>
> Thank you!
>
> On Mon, Apr 25, 2022 at 09:04:51AM -0700, Joel Brobecker wrote:
>> Hello,
>>
>> 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.
OK, thanks.
Richard
>> OK to push on master?
>>
>> Thank you,
>> --
>> Joel
>>
>> ---
>> gcc/testsuite/gcc.misc-tests/outputs.exp | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/gcc/testsuite/gcc.misc-tests/outputs.exp b/gcc/testsuite/gcc.misc-tests/outputs.exp
>> index bc1fbe4eb7f..afae735e92d 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 ""
>> }
>> --
>> 2.32.0
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ping] Re: [RFA] gcc.misc-tests/outputs.exp: Use link test to check for -gsplit-dwarf support
2022-05-23 8:05 ` Richard Sandiford
@ 2022-05-24 19:52 ` Joel Brobecker
0 siblings, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2022-05-24 19:52 UTC (permalink / raw)
To: Joel Brobecker via Gcc-patches, Joel Brobecker, richard.sandiford
> >> gcc/testsuite/ChangeLog:
> >>
> >> * gcc.misc-tests/outputs.exp: Make the -gsplit-dwarf test
> >> a compile-and-link test rather than a compile-only test.
>
> OK, thanks.
Thank you Richard. Pushed to master.
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-24 19:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-25 16:04 [RFA] gcc.misc-tests/outputs.exp: Use link test to check for -gsplit-dwarf support Joel Brobecker
2022-05-16 17:23 ` [ping] " Joel Brobecker
2022-05-23 8:05 ` Richard Sandiford
2022-05-24 19:52 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).