Caesar Wang has posted comments on this change. ( https://review.coreboot.org/19622 )
Change subject: src/include: remove the __ROMCC__ to enable snprintf ......................................................................
Patch Set 1:
I saw Paul posted the patch.
commit 8941158d1970c3da1d7fd9714dea32bec88d180e Author: Paul Menzel pmenzel@molgen.mpg.de Date: Wed Apr 19 15:09:57 2017 +0200
console: Make snprintf available in all stages
Change-Id: If5e255c75e7774393ef7e4febef84d97a1a3a118 Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de ----
As the previous said:" src/console/Makefile.inc to enable vsprintf.c in all stages, but I have seen some other build failure." ... CC bootblock/lib/memchr.o src/console/vsprintf.c:55:5: error: no previous prototype for 'snprintf' [-Werror=missing-prototypes] int snprintf(char *buf, size_t size, const char *fmt, ...)
Looks like, we don't need define the __PRE_RAM__ first. index 5b2486a..34aa370 100644 --- a/src/include/string.h +++ b/src/include/string.h @@ -15,9 +15,9 @@ void *memmove(void *dest, const void *src, size_t n); void *memset(void *s, int c, size_t n); int memcmp(const void *s1, const void *s2, size_t n); void *memchr(const void *s, int c, size_t n); +//#if !defined(__PRE_RAM__) int snprintf(char * buf, size_t size, const char *fmt, ...); +//#endif