Binutils test_build_id_debuglink
The patch modifies the build-id-debuglink test to avoid glibc source dependencies and improve test reliability.
This patch modifies the test_build_id_debuglink test in binutils to avoid dependencies on glibc source code during cross-compilation. The original test setup resulted in timeouts due to the test trying to locate glibc sources. The updated test builds executables with -shared -nostdlib and uses additional_flags instead of CFLAGS_FOR_TARGET to pass extra options to the compiler. This improves test reliability by eliminating the external source dependency.
- proposer
Proposes changes to the build-id-debuglink test to remove glibc source dependencies and improve test reliability.
“I saw build-id-debuglink test failures on a number of targets due to deleting the glibc source I'd used when building the cross toolchains. The tests failed with timeouts.”
In Details
This patch modifies the test_build_id_debuglink test in binutils/testsuite/binutils-all/objdump.exp. It addresses test failures caused by missing glibc sources during cross-compilation. The changes involve building the test program with -fPIC -shared -nostdlib, and using additional_flags instead of CFLAGS_FOR_TARGET to pass options to the compiler.
For Context
The binutils suite includes tools for manipulating binary files. The build-id-debuglink test verifies that debug information can be linked to stripped binaries using build IDs. This patch improves the reliability of this test by removing dependencies on external glibc source code during cross-compilation, ensuring that the test can run in environments where the glibc source is not available.