aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--TODO3
-rw-r--r--configure.ac8
-rwxr-xr-xdebian/rules8
-rwxr-xr-xdistribute3
-rw-r--r--scintilla.am7
5 files changed, 22 insertions, 7 deletions
diff --git a/TODO b/TODO
index 1349d4d..94ef048 100644
--- a/TODO
+++ b/TODO
@@ -184,9 +184,6 @@ Features:
Use Autotest for instance.
Optimizations:
- * Support link-time-optimization for Scintilla and SciTECO.
- This could significantly improve performance esp. when linking
- in everything statically as is done on Windows.
* Instead of using RTTI to implement the immediate editing command
behaviours in Cmdline::process_edit_cmd() depending on the current
state, this could be modelled via virtual methods in State.
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)
diff --git a/debian/rules b/debian/rules
index c8bea8d..7d6302c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,6 +12,11 @@
# build dependencies.
export TERM=
+# Build with link-time-optimizations
+export DEB_CFLAGS_MAINT_APPEND=-flto
+export DEB_CXXFLAGS_MAINT_APPEND=-flto
+export DEB_LDFLAGS_MAINT_APPEND=-flto
+
%:
dh $@
@@ -19,7 +24,8 @@ build:
dh_testdir
dh_auto_configure -- \
--enable-bootstrap \
- --with-interface=ncurses
+ --with-interface=ncurses \
+ $(shell dpkg-buildflags --export=configure)
dh_auto_build
touch $@
diff --git a/distribute b/distribute
index 24f9494..d8304dc 100755
--- a/distribute
+++ b/distribute
@@ -111,7 +111,8 @@ sciteco-$(SCITECO_VERSION)-win32.zip : $(SCITECO_SRC)
--with-interface=$(MINGW_UI) \
--disable-bootstrap \
--enable-html-manual \
- CFLAGS="-g -O3" CXXFLAGS="-g -O3"; \
+ CFLAGS="-g -O3 -flto" CXXFLAGS="-g -O3 -flto"; \
+ LDFLAGS="-flto" \
)
$(MAKE) -C sciteco-$(SCITECO_VERSION) \
install-strip DESTDIR=`pwd`/temp-install
diff --git a/scintilla.am b/scintilla.am
index df340bf..c9cf4c6 100644
--- a/scintilla.am
+++ b/scintilla.am
@@ -4,10 +4,13 @@
if INTERFACE_GTK
MAKE_SCINTILLA = $(MAKE) -C @SCINTILLA_PATH@/gtk \
- GTK3=yes CONFIGFLAGS='@LIBGTK_CFLAGS@'
+ GTK3=yes CONFIGFLAGS='@LIBGTK_CFLAGS@' \
+ CXXFLAGS='@SCINTILLA_CXXFLAGS@'
else
+# FIXME: There is currently no way to override the standard optimization
+# flags of Scinterm, so we pass them in CURSES_FLAGS.
MAKE_SCINTILLA = $(MAKE) -C @SCINTERM_PATH@ \
- CURSES_FLAGS='@PDCURSES_CFLAGS@ @XCURSES_CFLAGS@ @NCURSES_CFLAGS@'
+ CURSES_FLAGS='@PDCURSES_CFLAGS@ @XCURSES_CFLAGS@ @NCURSES_CFLAGS@ @SCINTILLA_CXXFLAGS@'
endif
# Pass toolchain configuration to Scintilla.