ld: Append LDFLAGS to flags variable in default_ld_link
The ld-link procedure now appends LDFLAGS to the flags variable, fixing issues with loading archives for specific targets.
The default_ld_link procedure in the linker testsuite now appends the contents of the LDFLAGS environment variable to the flags used for linking. This resolves issues encountered when loading archives for the hppa*64*-*-hpux* target when the host system is not HP-UX, ensuring test suites take LDFLAGS into account.
In Details
The default_ld_link procedure in ld/testsuite/lib/ld-lib.exp is used by some linker tests. This change ensures that the procedure uses the LDFLAGS environment variable. The hppa*64*-*-hpux* target had issues with the linker not picking up needed libraries due to missing LDFLAGS.
For Context
The linker (ld) combines compiled object files into an executable. During testing, it's important to pass the correct flags and library paths to the linker. The LDFLAGS environment variable is commonly used to specify these flags. This commit ensures that a test procedure correctly uses the LDFLAGS variable, fixing issues when cross-compiling for HP-UX.