[coreboot-gerrit] New patch to review for coreboot: 42ac281 mainboard: -ffreestanding so 'main' is not necessarily entry
Edward O'Callaghan (eocallaghan@alterapraxis.com)
gerrit at coreboot.org
Mon May 26 09:40:58 CEST 2014
Edward O'Callaghan (eocallaghan at alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5872
-gerrit
commit 42ac2818689e0e2f1bdc3d5c6610f4f413229324
Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date: Mon May 26 17:38:23 2014 +1000
mainboard: -ffreestanding so 'main' is not necessarily entry
From the C specification in 5.1.2.1 Freestanding environment;
"In a freestanding environment (in which C program execution may take
place without any benefit of an operating system), the name and type of
the function called at program startup are implementation-defined."
Clang complains about these being missing as Clang is somewhat more
strict about the spec than GNU/GCC is. An advantage here is that a
different entry-point type-signature shall now be warned about at
compile time.
Change-Id: I467001adabd47958c30c9a15e3248e42ed1151f3
Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
---
src/include/stddef.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/include/stddef.h b/src/include/stddef.h
index d0dad62..eda2806 100644
--- a/src/include/stddef.h
+++ b/src/include/stddef.h
@@ -30,6 +30,7 @@ typedef unsigned int wint_t;
#ifdef __PRE_RAM__
#define ROMSTAGE_CONST const
+void main(unsigned long bist); /* std signature of entry-point to romstage.c */
#else
#define ROMSTAGE_CONST
#endif
More information about the coreboot-gerrit
mailing list