From 21299f18ad706a17222bc4bc2ae31b1cbd033fc5 Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 7 Dec 2013 02:03:38 +0200 Subject: [PATCH] try to deal with some famec compiler issues --- cpu/fame/famec.c | 12 +++++++++++- jni/Android.mk | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cpu/fame/famec.c b/cpu/fame/famec.c index 2f10540d..9e9dc153 100644 --- a/cpu/fame/famec.c +++ b/cpu/fame/famec.c @@ -35,7 +35,17 @@ #define PICODRIVE_HACK // Options // - +#ifndef FAMEC_NO_GOTOS +// computed gotos is a GNU extension +#ifndef __GNUC__ +#define FAMEC_NO_GOTOS +#endif +// as of 3.3, clang takes over 3h to compile this in computed goto mode.. +#ifdef __clang__ +#define FAMEC_NO_GOTOS +#endif +#endif + #undef INLINE #ifdef _MSC_VER #define INLINE diff --git a/jni/Android.mk b/jni/Android.mk index 72a81634..122b18e8 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -73,8 +73,9 @@ LOCAL_SRC_FILES += $(R)unzip/unzip.c $(R)unzip/unzip_stream.c LOCAL_C_INCLUDES += $(R) +# note: don't use -O3, causes some NDKs run out of memory while compiling FAME +LOCAL_CFLAGS += -Wall -O2 -ffast-math -DNDEBUG LOCAL_CFLAGS += $(addprefix -D,$(DEFINES)) -LOCAL_CFLAGS += -Wall -O3 -ffast-math -DNDEBUG LOCAL_LDLIBS := -llog include $(BUILD_SHARED_LIBRARY) -- 2.39.5