summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2013-05-09 14:06:04 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-05-10 19:33:00 +0200
commitec664bcfa4ac3151f58853565b930b20b61b1bdd (patch)
tree92c546ca72a54e2dec798d8edc9d3b534198a5e7
parent711a6fde0db2f7a0c388fc97faec1013caaa2789 (diff)
downloadcoreboot-ec664bcfa4ac3151f58853565b930b20b61b1bdd.tar.xz
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 <reinauer@google.com> Reviewed-on: http://review.coreboot.org/3225 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
-rw-r--r--util/romcc/romcc.c9
1 files 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 <stdarg.h>
@@ -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);