From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Andreas_Bie=DFmann?= Date: Tue, 22 Nov 2011 09:49:46 +0100 Subject: [U-Boot] [PATCH v3] arm: printf() is not available in some SPL configurations In-Reply-To: <1321950379-25403-1-git-send-email-christian.riesch@omicron.at> References: <1321950379-25403-1-git-send-email-christian.riesch@omicron.at> Message-ID: <4ECB622A.3070408@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Christian, sorry I haven't followed the discussion so far. I have a little pointer too. Am 22.11.2011 09:26, schrieb Christian Riesch: > This patch avoids build breakage for SPLs that do not support printf. > > Signed-off-by: Christian Riesch > Cc: Wolfgang Denk > Cc: Tom Rini > Acked-by: Tom Rini > --- > Changes for v3: > - Removed extra white space > - Separated patch from patchset [1] > > [1] http://lists.denx.de/pipermail/u-boot/2011-November/110635.html > > arch/arm/lib/eabi_compat.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c > index eb3e26d..e1b87be 100644 > --- a/arch/arm/lib/eabi_compat.c > +++ b/arch/arm/lib/eabi_compat.c > @@ -13,7 +13,9 @@ > > int raise (int signum) > { > +#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT) > printf("raise: Signal # %d caught\n", signum); > +#endif Well, you can do it that way but I guess there are several places where printf() will be needed by some drivers in SPL. Therefore I think it is better to provide printf() for SPL than to ifdef out all the printf's. So how about providing an empty #if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT) #define printf(x) #endif somewhere in the SPL code? best regards Andreas Bie?mann