arm: Don't use printf() in SPL builds
authorSimon Glass <sjg@chromium.org>
Sat, 3 Mar 2012 20:33:15 +0000 (12:33 -0800)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sat, 7 Jul 2012 12:07:43 +0000 (14:07 +0200)
raise() likes to call printf() if it is available, but in SPL builds it
either is not available, or adds a large chunk to the resulting image
size.

So don't call it even if it is available.

This change reduces SPL size from 10KB to 6.3KB on hawkboard, for
example, using generic relocation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stefan Roese <sr@denx.de>
arch/arm/lib/eabi_compat.c

index 2028dbd..44eebe0 100644 (file)
@@ -13,7 +13,8 @@
 
 int raise (int signum)
 {
-#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
+       /* Even if printf() is available, it's large. Punt it for SPL builds */
+#if !defined(CONFIG_SPL_BUILD)
        printf("raise: Signal # %d caught\n", signum);
 #endif
        return 0;