aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2016-02-11 14:40:27 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2016-02-11 14:40:27 +0100
commit39fce8d0a5a6d91923e532a62ad2e6e4e26bdae7 (patch)
treef7ab38bcd4eccbd4eae15dc1f935e03e281edd98 /configure.ac
parentb259cb68aa3f76d1e23b47be67d3fbeb6f6b62df (diff)
downloadsciteco-39fce8d0a5a6d91923e532a62ad2e6e4e26bdae7.tar.gz
pass user/maintainer provided CXXFLAGS to the Scintilla build process
* Usually, Scintilla will now be built with -O2 * this can improve performance significantly over the standard Scintilla -Os (up to 10%). * this also allows link-time-optimizing both Scintilla and SciTECO (which are linked statically) by adding -flto to CFLAGS, CXXFLAGS and LDFLAGS. Link-time-optimization will both reduce the total binary size and improve performance slightly since scintilla_send_message() can be inlined. An -O3 optimized Scintilla when linked with LTO results in an only 300kb larger SciTECO binary. * the highest possible optimization thus requires the following maintainer flags on the ./configure command line: CFLAGS="-O3 -mtune=native -march=native -flto" CXXFLAGS="-O3 -mtune=native -march=native -flto" LDFLAGS="-flto" * Windows and Debian builds use link-time-optimization now. On Windows - where we link in everything statically - building the dependant libraries with -flto could improve performance even more. * Debian builds respect the default hardening flags of the build server now. This should ensure that SciTECO is built for the correct architecture at the recommended optimization level etc.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d44689b..56e61c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,14 @@ AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
+# Use the user provided CXXFLAGS for Scintilla as well.
+# This makes sure that the same optimizations are applied
+# to SciTECO and Scintilla.
+# We cannot pass CXXFLAGS directly to Scintilla since
+# we modify it during library checking.
+SCINTILLA_CXXFLAGS="$CXXFLAGS"
+AC_SUBST(SCINTILLA_CXXFLAGS)
+
# Automake build flag substitutions.
# Necessary so we can change their default values here
AC_SUBST(AM_CPPFLAGS)