Link libgomp plugins in the same way as libgomp proper
Libgomp plugins now use consistent linker flags for better stability.
This commit ensures that libgomp’s plugins (for nvptx and gcn) are linked using the same options as libgomp itself. Previously, the plugins were missing the -Wl,-O1 optimization flag due to differences in Makefile.am configurations. By introducing a new libgomp_plugin_LINK variable, the plugins now correctly inherit essential linker flags, aligning their build process with the main libgomp library and improving build consistency.
In Details
This change harmonizes the build process for libgomp plugins (nvptx, gcn) with that of the main libgomp library on x86_64-pc-linux-gnu. It was observed that libgomp.la is linked with -Wl,-O1, while the plugin .la files were not, due to AM_LDFLAGS not being properly propagated or set for plugins. This commit introduces libgomp_plugin_LINK in plugin/Makefrag.am, which is derived from libgomp/Makefile.am:LINK, ensuring that plugins are linked with the same essential flags, including optimization flags, as the main library. This resolves a discrepancy in the linking process and improv…
- libgomp
- GCC's implementation of the OpenMP runtime library, providing support for parallel programming.
- plugin
- A loadable module that extends the functionality of a program. In this context, libgomp plugins provide support for specific hardware targets.
- Makefile.am
- A file used by the Autotools build system (specifically Automake) to describe how to build targets, such as libraries and executables.
- libtool
- A build tool that provides a uniform interface for managing library archives. It helps in creating and installing libraries in a platform-independent way.
- linker flags
- Options passed to the linker program to control the linking process, such as specifying optimization levels or input/output files.