From: Joel Rosdahl Date: Sun, 21 Nov 2010 10:36:13 +0000 (+0100) Subject: Put -E compiler option check in the compopts table X-Git-Tag: v3.1.2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c0e6bf17116c25e7c3602da084cdae7d9005c9d7;p=thirdparty%2Fccache.git Put -E compiler option check in the compopts table --- diff --git a/ccache.c b/ccache.c index ee6c5ff73..4932e6131 100644 --- a/ccache.c +++ b/ccache.c @@ -1237,15 +1237,7 @@ cc_process_args(struct args *orig_args, struct args **preprocessor_args, continue; } - /* some options will never work ... */ - if (str_eq(argv[i], "-E")) { - cc_log("Compiler option -E is unsupported"); - stats_update(STATS_UNSUPPORTED); - result = false; - goto out; - } - - /* these are too hard */ + /* These are always too hard. */ if (compopt_too_hard(argv[i]) || str_startswith(argv[i], "@")) { cc_log("Compiler option %s is unsupported", argv[i]); stats_update(STATS_UNSUPPORTED); diff --git a/compopt.c b/compopt.c index 48cbb77ae..d65e7e084 100644 --- a/compopt.c +++ b/compopt.c @@ -36,6 +36,7 @@ static const struct compopt compopts[] = { {"--param", TAKES_ARG}, {"-A", TAKES_ARG}, {"-D", AFFECTS_CPP | TAKES_ARG | TAKES_CONCAT_ARG}, + {"-E", TOO_HARD}, {"-G", TAKES_ARG}, {"-I", AFFECTS_CPP | TAKES_ARG | TAKES_CONCAT_ARG | TAKES_PATH}, {"-L", TAKES_ARG},