From ec664bcfa4ac3151f58853565b930b20b61b1bdd Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Thu, 9 May 2013 14:06:04 -0700 Subject: [PATCH] romcc: support attribute((packed)) right now this is just a fake option to get rid of ifdefs in coreboot's code. Change-Id: I59233f3c1d266b4e716a5921e9db298c7f96751d Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/3225 Reviewed-by: Ronald G. Minnich Tested-by: build bot (Jenkins) --- util/romcc/romcc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c index d371506ec1..0c7c7e1f8e 100644 --- a/util/romcc/romcc.c +++ b/util/romcc/romcc.c @@ -3,8 +3,8 @@ #undef RELEASE_DATE #undef VERSION #define VERSION_MAJOR "0" -#define VERSION_MINOR "72" -#define RELEASE_DATE "10 February 2010" +#define VERSION_MINOR "73" +#define RELEASE_DATE "08 May 2013" #define VERSION VERSION_MAJOR "." VERSION_MINOR #include @@ -1085,6 +1085,7 @@ struct compile_state { struct hash_entry *i_return; struct hash_entry *i_noreturn; struct hash_entry *i_unused; + struct hash_entry *i_packed; /* Additional hash entries for predefined macros */ struct hash_entry *i_defined; struct hash_entry *i___VA_ARGS__; @@ -12756,6 +12757,9 @@ static unsigned int attrib(struct compile_state *state, unsigned int attributes) else if (ident == state->i_unused) { // attribute((unused)) does nothing (yet?) } + else if (ident == state->i_packed) { + // attribute((packed)) does nothing (yet?) + } else { error(state, 0, "Unknown attribute:%s", ident->name); } @@ -24994,6 +24998,7 @@ static void compile(const char *filename, state.i_always_inline = lookup(&state, "always_inline", 13); state.i_noreturn = lookup(&state, "noreturn", 8); state.i_unused = lookup(&state, "unused", 6); + state.i_packed = lookup(&state, "packed", 6); /* Process the command line macros */ process_cmdline_macros(&state);