[RFA] gcc.misc-tests/outputs.exp: Use link test to check for -gsplit-dwarf support
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
[ping] Re: [RFA] gcc.misc-tests/outputs.exp: Use link test to check for -gsplit-dwarf support
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
Re: [ping] Re: [RFA] gcc.misc-tests/outputs.exp: Use link test to check for -gsplit-dwarf support
> >> 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
[RFA] src-release.sh: Fix gdb source tarball build failure due to libsframe
Hello, This script was recently changed as follow: | commit e619dddb3a45780ae66d762756882a3b896b617d | Date: Tue Nov 15 15:07:13 2022 -0800 | Subject: src-release.sh: Add libsframe | | Add libsframe to the list of top level directories that will be included | in a release. Since then, the gdb source tarball has been failing with the error below during the "make configure-host configure-target" phase: | make[3]: *** No rule to make target '../libsframe/libsframe.la', | needed by 'libbfd.la'. Stop. | make[3]: Leaving directory '/tmp/gdb-public/bfd' This patch fixes the issue by adding libsframe to the list of GDB_SUPPORT_DIRS, similar to what was done for BINUTILS. ChangeLog: * src-release.sh (GDB_SUPPORT_DIRS): Add libsframe. Ok to apply to master? NB: Once approved, I will take care of applying the patch to both binutils-gdb and gcc (hence the Cc: of gcc-patches). Thank you, --- src-release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-release.sh b/src-release.sh index 050a8eb958d..ec28f8691c7 100755 --- a/src-release.sh +++ b/src-release.sh @@ -322,7 +322,7 @@ gas_release() tar_compress $package $tool "$GAS_SUPPORT_DIRS" "$compressors" } -GDB_SUPPORT_DIRS="bfd include libiberty libctf opcodes readline sim intl libdecnumber cpu zlib contrib gnulib gdbsupport gdbserver libbacktrace" +GDB_SUPPORT_DIRS="libsframe bfd include libiberty libctf opcodes readline sim intl libdecnumber cpu zlib contrib gnulib gdbsupport gdbserver libbacktrace" gdb_release() { compressors=$1 -- 2.34.1
Re: [RFA] src-release.sh: Fix gdb source tarball build failure due to libsframe
> > "Joel" == Joel Brobecker via Gdb-patches > > writes: > > Joel> ChangeLog: > > Joel> * src-release.sh (GDB_SUPPORT_DIRS): Add libsframe. > > Joel> Ok to apply to master? > > Looks good to me. > I think we recently agreed that gdb and binutils maintainers can approve > patches like this... ? Thanks Tom. Pushed to master. FTR, I thought this script was also part of the GCC repository, but discovered that this is not the case when I tried to apply the same patch there. -- Joel