10bet网址
MySQL Internals Manual


4.4.6.7 Packager-Friendly Build Options (Unix)

MySQL source distribution contains sources for zlib (compression library), yaSSL (ssl library), libedit, and (in MySQL 5.5 only) readline. MySQL can be compiled using either libraries available on the system or, to minimize external dependencies, with bundled sources. For Unix/Linux packagers, using system libraries is a more natural option and CMake has support for that, using the following options:

On Linux,--Wl,--as-neededlink options can also be used to remove unused dependencies. Although the CMake build tries to avoid unneeded dependencies,--as-neededproduces better results. For example, it removes unused dependencies onlibgcc_s.so.

--Wl,--no-undefinedcannotbe used at the moment if plugins are built because plugins have direct dependency (use symbols) exported by MySQL server.