[debian-mysql] What is MYSQL_BUILD_CXXFLAGS?

Otto Kekäläinen otto at seravo.fi
Tue Sep 2 19:29:46 UTC 2014


Hello!

I've been trying to clean up the d/rules file and also to address the
hardening-wrapper is depricated -issue.

I noticed that the rules file in MySQL (and from there inherited,
MariaDB too) has variables like MYSQL_BUILD_CXXFLAGS and
MYSQL_BUILD_CFLAGS.

Grepping for these shows only this:
mysql-5.6$ grep -R MYSQL_BUILD_CXXFLAGS *
debian/rules:     CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O3 -DBIG_JOINS=1
-felide-constructors -fno-exceptions -fpermissive -fno-rtti
${FORCE_FPIC_CFLAGS} -fno-strict-aliasing ${TAOCRYPT_OPT}"} \
support-files/mysql.5.6.20.spec:export
CXXFLAGS=${MYSQL_BUILD_CXXFLAGS:-${CXXFLAGS:-$RPM_OPT_FLAGS
-felide-constructors}}
support-files/mysql.spec.sh:export
CXXFLAGS=${MYSQL_BUILD_CXXFLAGS:-${CXXFLAGS:-$RPM_OPT_FLAGS
-felide-constructors}}

Nothing seems to control or set those variables. They most like are
old unused cruft, but I think it's best to check from this list first.

Can/should we remove those?


Instead we should probably have something like:

CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

..as recommended at
https://wiki.debian.org/Hardening#Notes_for_packages_using_CMake ?



More information about the pkg-mysql-maint mailing list