Integrate libffi testsuite with GCC testsuite
The libffi testsuite is now integrated with the GCC testsuite.
This commit integrates the libffi testsuite into the GCC testsuite. It loads libraries from the GCC testsuite and uses libraries in the GCC build tree. This change streamlines testing and ensures compatibility between libffi and GCC, which helps catch regressions and improve overall reliability.
In Details
This change modifies testsuite/lib/libffi.exp, target-supports.exp, and target-supports-dg.exp to load and use libffi from the GCC build tree. It also adjusts flags and link options, especially for Darwin, and considers --with-build-sysroot for build-tree testing. This integration simplifies cross-testing but may require awareness of GCC's build structure.
For Context
Libffi is a library that provides a portable way to call functions dynamically. This means it allows a program to call functions without knowing their names or arguments at compile time. Integrating libffi's test suite with GCC's ensures that libffi works correctly with GCC and helps prevent compatibility issues. By incorporating libffi into the GCC build process, the combined toolchain can be tested more effectively, which ultimately enhances the reliability and stability of both projects.