Drop ROMCC code and header guards

Change-Id: I730f80afd8aad250f26534435aec24bea75a849c
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37334
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
This commit is contained in:
Arthur Heymans
2019-11-28 16:05:08 +01:00
committed by Kyösti Mälkki
parent 4f66cb9b28
commit 1cb9cd5798
35 changed files with 13 additions and 299 deletions

View File

@@ -187,11 +187,6 @@ struct cbfs_file_attr_align {
uint32_t alignment;
} __packed;
/*
* ROMCC does not understand uint64_t, so we hide future definitions as they are
* unlikely to be ever needed from ROMCC
*/
#ifndef __ROMCC__
/*** Component sub-headers ***/
@@ -236,6 +231,4 @@ struct cbfs_optionrom {
uint32_t len;
} __packed;
#endif /* __ROMCC__ */
#endif /* _CBFS_SERIALIZED_H_ */

View File

@@ -41,13 +41,10 @@
var_a op var_b ? var_a : var_b; \
})
#ifdef __ROMCC__ /* romcc doesn't support __builtin_choose_expr() */
#define __CMP(a, b, op) __CMP_UNSAFE(a, b, op)
#else
#define __CMP(a, b, op) __builtin_choose_expr( \
__builtin_constant_p(a) && __builtin_constant_p(b), \
__CMP_UNSAFE(a, b, op), __CMP_SAFE(a, b, op, __TMPNAME, __TMPNAME))
#endif
#ifndef MIN
#define MIN(a, b) __CMP(a, b, <)
@@ -108,12 +105,8 @@
#define GHz (1000 * MHz)
#ifndef offsetof
#ifdef __ROMCC__
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#else
#define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
#endif
#endif
#define check_member(structure, member, offset) _Static_assert( \
offsetof(struct structure, member) == offset, \