summaryrefslogtreecommitdiffstats
path: root/apps/codecs/libtremor/config-tremor.h
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2009-10-04 08:49:23 +0000
committerDave Chapman <dave@dchapman.com>2009-10-04 08:49:23 +0000
commit9546e4093d8a6f9b27c06db242894c3dc9d9f574 (patch)
tree5d7571051b6d08993448ba3493c0bd678998f1fe /apps/codecs/libtremor/config-tremor.h
parentccec5cfe79025b4f203619a0d8b4083445e6063c (diff)
downloadrockbox-9546e4093d8a6f9b27c06db242894c3dc9d9f574.tar.gz
rockbox-9546e4093d8a6f9b27c06db242894c3dc9d9f574.tar.bz2
rockbox-9546e4093d8a6f9b27c06db242894c3dc9d9f574.zip
Add STATICIRAM_NOT_MDCT as a workaround for the gcc bug where static functions are not long called. This is currently only an issue on the Nano2G (S5L8701 CPU) which is the only ARM target with enough IRAM for these functions. Also add multiple-inclusion protection for config-tremor.h. All plugins and codecs now compile cleanly for the Nano2G.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22914 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libtremor/config-tremor.h')
-rw-r--r--apps/codecs/libtremor/config-tremor.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/codecs/libtremor/config-tremor.h b/apps/codecs/libtremor/config-tremor.h
index d360b5fd73..403fdfd88b 100644
--- a/apps/codecs/libtremor/config-tremor.h
+++ b/apps/codecs/libtremor/config-tremor.h
@@ -1,4 +1,8 @@
+#ifndef _CONFIG_TREMOR_H
+#define _CONFIG_TREMOR_H
+
#include "codeclib.h"
+
#ifdef CPU_ARM
#define _ARM_ASSEM_
#endif
@@ -17,6 +21,14 @@
#define ICODE_ATTR_TREMOR_MDCT ICODE_ATTR
#endif
+/* Workaround for gcc bug where all static functions are called with short
+ calls */
+#if !defined(ICODE_ATTR_TREMOR_NOT_MDCT) && (CONFIG_CPU==S5L8701)
+#define STATICIRAM_NOT_MDCT
+#else
+#define STATICIRAM_NOT_MDCT static
+#endif
+
#ifndef ICODE_ATTR_TREMOR_NOT_MDCT
#define ICODE_ATTR_TREMOR_NOT_MDCT ICODE_ATTR
#endif
@@ -47,3 +59,5 @@
#define CHANNELS 2
// #define _LOW_ACCURACY_
+
+#endif /* _CONFIG_TREMOR_H */