From: notaz Date: Sat, 7 Dec 2013 00:03:38 +0000 (+0200) Subject: try to deal with some famec compiler issues X-Git-Tag: v1.92~77 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21299f18ad706a17222bc4bc2ae31b1cbd033fc5;p=picodrive.git try to deal with some famec compiler issues --- 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)