Details
-
Bug
-
Status: On Hold
-
High
-
Resolution: Unresolved
-
None
-
None
Description
**Reported in Launchpad by Raghavendra D Prabhu last update 17-11-2015 10:33:26
Currently we have following in our build scripts (that we use for releases):
export CFLAGS="fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION $TARGET_CFLAGS ${CFLAGS:}"
export CXXFLAGS="O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION $TARGET_CFLAGS ${CXXFLAGS:}"
There are a few anomalies here:
a) -Wp,-D_FORTIFY_SOURCE=2 is used only for CXXFLAGS. Why isn't
it there for CFLAGS. Also, we need to compare the costs to
performance here (also, if stack protection is really desired
then -fstack-protector --param=ssp-buffer-size=4 are required in
addition)
b) Why O3 for CFLAGS and O2 for CXXFLAGS? Again, here the
costs/benefits of O3 need to be analysed (size/icache v/s performance).
c) Is static-libstdc++ required for CXXFLAGS like static-libgcc
in CFLAGS?
In debian/rules we have
"-O3 -DBIG_JOINS=1" for CFLAGS
"-O3 -DBIG_JOINS=1 -felide-constructors -fno-exceptions -fno-rtti" for CXXFLAGS.
These also need to be checked and added to rpm build script if
needed.