From a538b89060bee76d5c6a078883748cac0a720ea7 Mon Sep 17 00:00:00 2001 From: Magnus Holmgren Date: Tue, 30 Jun 2009 21:32:38 +0000 Subject: [PATCH] Second attempt at fixing FS#10396. Turns out that gcc for coldfire choose to inline a function with a big appetite for stack. The previous fix improved things a bit, but not nearly enough. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21580 a1c6a512-1295-4272-9138-f99709370657 --- apps/tagcache.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/tagcache.c b/apps/tagcache.c index 8448c02db1..391d8c6f81 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c @@ -1653,12 +1653,16 @@ static int check_if_empty(char **tag) entry.tag_offset[tag] = offset; \ entry.tag_length[tag] = check_if_empty(data); \ offset += entry.tag_length[tag] - -static void add_tagcache(char *path, unsigned long mtime +/* GCC 3.4.6 for Coldfire can choose to inline this function. Not a good + * idea, as it uses lots of stack and is called from a recursive function + * (check_dir). + */ +static void __attribute__ ((noinline)) add_tagcache(char *path, + unsigned long mtime #if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE) - ,const struct dirent *dc + ,const struct dirent *dc #endif - ) + ) { struct mp3entry id3; struct temp_file_entry entry;