• unknown's avatar
    Bug #21158 mysql_config doesn't include -lmygcc · 29dcd861
    unknown authored
    Add -lmygcc to mysql_config output for libs, libs_r, and embedded_libs.
    
    Required when linking against our static libs, if yassl is used, and gcc
    used to build library is significantly different from that which is using
    the library.
    
    
    scripts/mysql_config.sh:
      Add -lmygcc to --libs, --libs_r, and --embedded-libs output, if libmygcc.a
      is found in the pkglibdir.
      
      This works around a problem when linking against the static client
      libs which were built with a different GCC than the current compiler.
      In this case, without -lmygcc, several builtin functions (e.g.,
      __pure_virtual, __builtin_delete) are left undefined.  Currently it
      is yassl which pulls in these symbols.
      
      This isn't a problem when linking against shared libraries, or when
      using the same compiler version.
      
      Currently it shows up with libs built on build.mysql.com with gcc 2.95.3,
      when using them on more recent systems.
      
      
      Also strip the -mcpu, -mtune, and -march cflags.  The calling package can
      determine what optimization parameters to choose.
    29dcd861
mysql_config.sh 5.75 KB