8.5 Options That Control Multilib Library Selection

Multilibs are a set of prebuilt target libraries. Each target library in the multilib gets built with a different set of compiler options. Multilibs provide the linker with the capability to match a target library with the compiler options used to build an application. The prebuilt target libraries represent the most common combinations of compiler options.

When the compilation driver is called to link an application, the driver chooses the version of the target library that corresponds to the application options. These options should be passed to the compilation driver, not the linker proper. The compilation driver then translates the options to the appropriate -L library search path when calling the linker.