diff --git a/ChangeLog b/ChangeLog index a17a444d5..a39ed03d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-06-24 Paulo Andrade + + * check/lightning.c: Clearly run check if clang is the system + compiler. + 2015-06-20 Paulo Andrade * lib/jit_sparc-cpu.c, lib/jit_sparc-fpu.c, lib/jit_sparc.c: diff --git a/check/lightning.c b/check/lightning.c index 02d418af8..2422fff82 100644 --- a/check/lightning.c +++ b/check/lightning.c @@ -4170,7 +4170,12 @@ main(int argc, char *argv[]) strncpy(parser.name, endptr, sizeof(parser.name)); parser.name[sizeof(parser.name) - 1] = '\0'; } - opt_short = snprintf(cmdline, sizeof(cmdline), "gcc -E -x c %s", argv[opt_index]); +#if __clang__ +# define cc "clang" +#else +# define cc "gcc" +#endif + opt_short = snprintf(cmdline, sizeof(cmdline), cc " -E -x c %s", argv[opt_index]); for (++opt_index; opt_index < argc; opt_index++) { if (argv[opt_index][0] == '-') opt_short += snprintf(cmdline + opt_short,