mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
ccan: update so we get configurator with --configurator-cc= arg.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
fd4a36e777
commit
8c2a556f55
@ -1,3 +1,3 @@
|
|||||||
CCAN imported from http://ccodearchive.net.
|
CCAN imported from http://ccodearchive.net.
|
||||||
|
|
||||||
CCAN version: init-2402-gec1f7161
|
CCAN version: init-2403-g8502a66a
|
||||||
|
@ -670,13 +670,15 @@ int main(int argc, const char *argv[])
|
|||||||
const char *default_args[]
|
const char *default_args[]
|
||||||
= { "", DEFAULT_COMPILER, DEFAULT_FLAGS, NULL };
|
= { "", DEFAULT_COMPILER, DEFAULT_FLAGS, NULL };
|
||||||
const char *outflag = DEFAULT_OUTPUT_EXE_FLAG;
|
const char *outflag = DEFAULT_OUTPUT_EXE_FLAG;
|
||||||
|
const char *configurator_cc = NULL;
|
||||||
|
const char *orig_cc;
|
||||||
|
|
||||||
if (argc > 0)
|
if (argc > 0)
|
||||||
progname = argv[0];
|
progname = argv[0];
|
||||||
|
|
||||||
while (argc > 1) {
|
while (argc > 1) {
|
||||||
if (strcmp(argv[1], "--help") == 0) {
|
if (strcmp(argv[1], "--help") == 0) {
|
||||||
printf("Usage: configurator [-v] [-O<outflag>] [<compiler> <flags>...]\n"
|
printf("Usage: configurator [-v] [-O<outflag>] [--configurator-cc=<compiler-for-tests>] [<compiler> <flags>...]\n"
|
||||||
" <compiler> <flags> will have \"<outflag> <outfile> <infile.c>\" appended\n"
|
" <compiler> <flags> will have \"<outflag> <outfile> <infile.c>\" appended\n"
|
||||||
"Default: %s %s %s\n",
|
"Default: %s %s %s\n",
|
||||||
DEFAULT_COMPILER, DEFAULT_FLAGS,
|
DEFAULT_COMPILER, DEFAULT_FLAGS,
|
||||||
@ -701,6 +703,10 @@ int main(int argc, const char *argv[])
|
|||||||
argc--;
|
argc--;
|
||||||
argv++;
|
argv++;
|
||||||
verbose += 2;
|
verbose += 2;
|
||||||
|
} else if (strncmp(argv[1], "--configurator-cc=", 18) == 0) {
|
||||||
|
configurator_cc = argv[1] + 18;
|
||||||
|
argc--;
|
||||||
|
argv++;
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -709,6 +715,10 @@ int main(int argc, const char *argv[])
|
|||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
argv = default_args;
|
argv = default_args;
|
||||||
|
|
||||||
|
orig_cc = argv[1];
|
||||||
|
if (configurator_cc)
|
||||||
|
argv[1] = configurator_cc;
|
||||||
|
|
||||||
cmd = connect_args(argv, outflag, OUTPUT_FILE " " INPUT_FILE);
|
cmd = connect_args(argv, outflag, OUTPUT_FILE " " INPUT_FILE);
|
||||||
for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
|
for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
|
||||||
run_test(cmd, &tests[i]);
|
run_test(cmd, &tests[i]);
|
||||||
@ -723,7 +733,7 @@ int main(int argc, const char *argv[])
|
|||||||
printf("#ifndef _GNU_SOURCE\n");
|
printf("#ifndef _GNU_SOURCE\n");
|
||||||
printf("#define _GNU_SOURCE /* Always use GNU extensions. */\n");
|
printf("#define _GNU_SOURCE /* Always use GNU extensions. */\n");
|
||||||
printf("#endif\n");
|
printf("#endif\n");
|
||||||
printf("#define CCAN_COMPILER \"%s\"\n", argv[1]);
|
printf("#define CCAN_COMPILER \"%s\"\n", orig_cc);
|
||||||
cmd = connect_args(argv + 1, "", "");
|
cmd = connect_args(argv + 1, "", "");
|
||||||
printf("#define CCAN_CFLAGS \"%s\"\n", cmd);
|
printf("#define CCAN_CFLAGS \"%s\"\n", cmd);
|
||||||
free(cmd);
|
free(cmd);
|
||||||
|
Loading…
Reference in New Issue
Block a user