mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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).
This commit is contained in:
5
Makefile
5
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
|
||||
|
||||
@@ -58,6 +58,7 @@ ifdef EMULATE_READER
|
||||
endif
|
||||
else
|
||||
CFLAGS+= $(ARM_CFLAGS)
|
||||
CXXFLAGS+= $(ARM_CFLAGS)
|
||||
endif
|
||||
|
||||
# standard includes
|
||||
@@ -193,7 +194,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):
|
||||
|
||||
Reference in New Issue
Block a user