From 15baa52889cf4092553f26ceadfb6f2b58e06cc9 Mon Sep 17 00:00:00 2001 From: Tigran Aivazian Date: Mon, 1 Oct 2012 12:09:13 +0100 Subject: [PATCH] ARM-specific optimizations Thanks to NiLuJe who pointed out that our generic -march=armv6 can be replaced (for K2/K3/DX/DXG) with a more specific optimization: -march=armv6j -mtune=arm1136jf-s -mfpu=vfp. This I have now done and also passed ARM_CFLAGS value to CXXFLAGS which is then passed to crengine build. Tested, works fine. The performance improvement is negligible (a few ms per page, but seems to be consistently better, i.e. not just plus/minus fluctuations). --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1241a8d8f..cdfd18203 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ HOSTCXX:=g++ CFLAGS:=-O3 $(SYSROOT) CXXFLAGS:=-O3 $(SYSROOT) LDFLAGS:= $(SYSROOT) -ARM_CFLAGS:=-march=armv6 +ARM_CFLAGS:=-march=armv6j -mtune=arm1136jf-s -mfpu=vfp # use this for debugging: #CFLAGS:=-O0 -g $(SYSROOT) @@ -58,6 +58,7 @@ ifdef EMULATE_READER endif else CFLAGS+= $(ARM_CFLAGS) + CXXFLAGS+= $(ARM_CFLAGS) endif # standard includes @@ -197,7 +198,7 @@ endif $(CRENGINELIBS): cd $(KPVCRLIBDIR) && rm -rf CMakeCache.txt CMakeFiles && \ - CFLAGS="$(CFLAGS)" CC="$(CC)" CXX="$(CXX)" cmake . && \ + CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CC="$(CC)" CXX="$(CXX)" cmake . && \ make $(LUALIB):