This is a bug with MySQL and not just Gentoo but I thought I'd file it here first in hopes that a fix will be sent upstream. The mysql_config utility is encoding the value of CFLAGS into the output of it's --cflags option. This is an incorrect behavior. --cflags should *only* return the CFLAG values needed to link against libmysqlclient*. This can be particullary annoying if MySQL is built with -g or optimization flags that will break the compilation of packages that depend on libmysqlclient. Eg. I'm on my laptop the output of `mysql_config --cflags` looks like this: -I/usr/include/mysql -pipe -march=pentium-m -mfpmath=sse -msse -msse2 -DHAVE_ERRNO_AS_DEFINE=1 -fno-exceptions -fno-strict-aliasing The solution is problem for MySQL's configure.ac to keep the value of CFLAGS seperated from the MYSQL_CFLAGS value that gets backed into mysql_config. (as is what is typically done with pkg-config .pc files) Reproducible: Always
*** This bug has been marked as a duplicate of bug 156301 ***