From f10feb9b941d6fa8e259e2948a40d0f03d3bdc46 Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 10 Nov 2012 17:27:29 +0800 Subject: [PATCH] add -fno-finite-math-only in KOPT_CFLAGS In some compilation platform if finite-math-only option is turned on, math functions like exp and sqrt will be dynamically linked to finite versions which cannot be located in Kindle's GLIBC. In my toolchain the symbol __exp_finite cannot be found in GLIBC_2.4 so gcc just use __exp_finite in GLIBC_2.15, which will cause a run time error in Kindle saying "version GLIBC_2.15 not found" --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 89094c3b6..761e884f0 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ 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 -pipe +KOPT_CFLAGS:=-O3 -ffast-math -fno-finite-math-only -pipe # 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).