From: Simon Glass Date: Sat, 3 Mar 2012 20:33:15 +0000 (-0800) Subject: arm: Don't use printf() in SPL builds X-Git-Tag: v2012.07-rc1~11^2~14 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fe901f2d9bd09292a67e562b8c96a1a496004c9e;p=u-boot arm: Don't use printf() in SPL builds 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 Acked-by: Stefan Roese --- diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c index 2028dbd715..44eebe0a5d 100644 --- a/arch/arm/lib/eabi_compat.c +++ b/arch/arm/lib/eabi_compat.c @@ -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;