[arch-general] Removing compiler flag from CMake output

Marcel Korpel marcel.korpel at gmail.com
Thu Oct 9 12:57:39 UTC 2014


Hi,

As I already feared, someone tried to build mysql-connector-c++ [1]
against libmysqlclient 5.6.20-1, which results in the following error:

…/driver/mysql_metadata.cpp:1216:74: error: ‘dynamic_cast’ not
permitted with -fno-rtti

How do I remove that compiler flag from CMake output?

I already tried adding -frtti to CXXFLAGS in makepkg.conf, but this
didn't change the compiler flags. I also tried to add it as an
environment variable to the cmake call in PKGBUILD and add a

set(CMAKE_CXX_FLAGS "-frtti")

at several places in …/CMakeLists.txt, but to no avail, CMake keeps
saying

-- MySQL CXXFLAGS: -I/usr/include/mysql -fPIC -pipe -msse4.1 -mmmx
-fomit-frame-pointer -fstack-protector-strong --param=ssp-buffer-size=4
-fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-rtti -g
-DNDEBUG

And why isn't this a problem when building against libmariadbclient
10.0.14?

Regards,
Marcel

[1] https://aur.archlinux.org/packages/mysql-connector-c%2B%2B/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/arch-general/attachments/20141009/ed247911/attachment.bin>


More information about the arch-general mailing list