Uploaded image for project: 'Percona XtraDB Cluster'
  1. Percona XtraDB Cluster
  2. PXC-1097

LP #1272732: CFLAGS/CXXFLAGS used in our build scripts

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: On Hold
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Packaging
    • Labels:

      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.

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              lpjirasync lpjirasync (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: