From 97f69a9c9c8c40977f7f59c94cacfb0c303ca44a Mon Sep 17 00:00:00 2001 From: pcpa Date: Sun, 24 May 2015 13:50:58 -0300 Subject: [PATCH] Correct make check for systems without gcc. * check/lightning.c: Clearly run check if clang is the system compiler. --- ChangeLog | 5 +++++ check/lightning.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) 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,