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
This commit is contained in:
Patrick Georgi
2010-03-25 21:45:25 +00:00
parent 0ab9d12e29
commit 516a2a7bfa
6 changed files with 48 additions and 8 deletions

View File

@ -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));