Integrate libffi build with GCC
The libffi build process is now integrated with GCC's build system.
This commit integrates the libffi build process with GCC. It modifies Makefiles and configure scripts to align libffi’s build system with GCC’s. By unifying the build processes, this change simplifies the overall build process and ensures consistency between libffi and GCC, potentially reducing build-related issues and improving maintainability.
In Details
This commit modifies Makefile.am, configure, and configure.ac to integrate libffi's build with GCC's. Changes include adjusting flags, link options, and directory structures, incorporating multilib support, and enabling features like CET. The integration touches multiple aspects of the build system which can assist in cross-project builds, but it also increases complexity due to interactions between the two build systems.
For Context
Libffi is a library that provides a portable calling interface, useful for calling functions dynamically. Integrating libffi's build process with GCC means that libffi is now built as part of the GCC build, rather than separately. This ensures that libffi is built in a way that is compatible with GCC. This integration simplifies the build process and can prevent compatibility issues between libffi and GCC, resulting in a more robust and reliable toolchain.