diff options
author | Patrick Georgi <patrick.georgi@coresystems.de> | 2010-03-25 21:45:25 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2010-03-25 21:45:25 +0000 |
commit | 516a2a7bfaee5d4aa4d1e7e5ff52d3038513c82f (patch) | |
tree | 5dc3dcc6d27c286af863850e2c88b796583ffe08 /util/romcc | |
parent | 0ab9d12e290ab79786d34fdf12c99922f5255aff (diff) | |
download | coreboot-516a2a7bfaee5d4aa4d1e7e5ff52d3038513c82f.tar.xz |
Add support to build with ccache in the build system
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5297 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/romcc')
-rw-r--r-- | util/romcc/romcc.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c index aee86968af..b7c7a01d35 100644 --- a/util/romcc/romcc.c +++ b/util/romcc/romcc.c @@ -24968,10 +24968,14 @@ static void compile(const char *filename, state.errout = stderr; state.dbgout = stdout; /* Remember the output filename */ - state.output = fopen(state.compiler->ofilename, "w"); - if (!state.output) { - error(&state, 0, "Cannot open output file %s\n", - state.compiler->ofilename); + if ((state.compiler->flags & COMPILER_PP_ONLY) && (strcmp("auto.inc",state.compiler->ofilename) == 0)) { + state.output = stdout; + } else { + state.output = fopen(state.compiler->ofilename, "w"); + if (!state.output) { + error(&state, 0, "Cannot open output file %s\n", + state.compiler->ofilename); + } } /* Make certain a good cleanup happens */ exit_state = &state; @@ -25146,6 +25150,12 @@ int main(int argc, char **argv) else if (strncmp(argv[1], "-m", 2) == 0) { result = arch_encode_flag(&arch, argv[1]+2); } + else if (strncmp(argv[1], "-c", 2) == 0) { + result = 0; + } + else if (strncmp(argv[1], "-S", 2) == 0) { + result = 0; + } else if (strncmp(argv[1], "-include", 10) == 0) { struct filelist *old_head = include_filelist; include_filelist = malloc(sizeof(struct filelist)); |