From 4d14cd69b238e408567ca719b5c4a1254869f1b4 Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 10 Nov 2012 19:13:03 +0800 Subject: [PATCH] use -O3 option in compiling libk2pdfopt Probably we should use fomit-frame-pointer explicitly even though fomit-frame-pointer is included by default with -O2 and -O3 just like the Linux kernel guys doing. I found append -O3 directly to `CFLAGES` will do the trick. So I removed the KOPT_CFLAGS variable. --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 761e884f0..e6498ff8c 100644 --- a/Makefile +++ b/Makefile @@ -35,8 +35,7 @@ HOSTCXX:=g++ HOSTAR:=ar # Base CFLAGS, without arch. We'll need it for luajit, because its Makefiles do some tricky stuff to differentiate HOST/TARGET -BASE_CFLAGS:=-O2 -ffast-math -pipe -KOPT_CFLAGS:=-O3 -ffast-math -fno-finite-math-only -pipe +BASE_CFLAGS:=-O2 -ffast-math -pipe -fomit-frame-pointer # Use this for debugging: #BASE_CFLAGS:=-O0 -g # Misc GCC tricks to ensure backward compatibility with the K2, even when using a fairly recent TC (Linaro/MG). @@ -280,7 +279,7 @@ $(POPENNSLIB): $(MAKE) -C $(POPENNSDIR) CC="$(CC)" AR="$(AR)" $(K2PDFOPTLIB): - $(MAKE) -C $(K2PDFOPTLIBDIR) BUILDMODE=shared CC="$(CC)" CFLAGS="$(KOPT_CFLAGS)" AR="$(AR)" all + $(MAKE) -C $(K2PDFOPTLIBDIR) BUILDMODE=shared CC="$(CC)" CFLAGS="$(CFLAGS) -O3" AR="$(AR)" all test -d $(LIBDIR) || mkdir $(LIBDIR) cp -a $(K2PDFOPTLIBDIR)/libk2pdfopt.so* $(LIBDIR)