Binutils test_build_id_debuglink updated.
The test_build_id_debuglink test now uses -shared -nostdlib to avoid glibc source dependencies.
The test_build_id_debuglink test is updated to build test programs with -shared -nostdlib to remove dependencies on glibc sources. This avoids test failures and timeouts caused by missing glibc source files during cross-compilation. The code no longer passes extra options to target_compile via CFLAGS_FOR_TARGET; instead, it uses additional_flags.
In Details
This commit modifies testsuite/binutils-all/objdump.exp to update the test_build_id_debuglink test. The key change is building the test executable with -fPIC -shared -nostdlib instead of relying on glibc headers which caused issues when the glibc source tree was unavailable. The commit also replaces the use of CFLAGS_FOR_TARGET with additional_flags.
For Context
This commit improves the reliability of a test within the binutils test suite. It addresses issues where the test would fail if the glibc (GNU C Library) source code was not available, which could occur during cross-compilation or in environments where the full glibc development headers were not installed. The test now builds a shared library without relying on standard system libraries, ensuring it can run in more isolated environments.