From b5af2d3428f86bf8c29c2003e253ec274a2ac46a Mon Sep 17 00:00:00 2001 From: Christian Jullien Date: Sat, 11 Jul 2020 06:41:44 +0200 Subject: [PATCH] Add -C gcc compatible option which does currently nothing. This allows, among others, to compile gnumake from git ROOTB. --- libtcc.c | 5 ++++- tcc.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libtcc.c b/libtcc.c index ee12eeb53..c3d96d43a 100644 --- a/libtcc.c +++ b/libtcc.c @@ -1622,7 +1622,8 @@ enum { TCC_OPTION_MF, TCC_OPTION_x, TCC_OPTION_ar, - TCC_OPTION_impdef + TCC_OPTION_impdef, + TCC_OPTION_C }; #define TCC_OPTION_HAS_ARG 0x0001 @@ -1690,6 +1691,7 @@ static const TCCOption tcc_options[] = { #ifdef TCC_TARGET_PE { "impdef", TCC_OPTION_impdef, 0}, #endif + { "C", TCC_OPTION_C, 0}, { NULL, 0, 0 }, }; @@ -2065,6 +2067,7 @@ PUB_FUNC int tcc_parse_args(TCCState *s, int *pargc, char ***pargv, int optind) case TCC_OPTION_pedantic: case TCC_OPTION_pipe: case TCC_OPTION_s: + case TCC_OPTION_C: /* ignored */ break; default: diff --git a/tcc.c b/tcc.c index 95eff3c91..4f4eb6235 100644 --- a/tcc.c +++ b/tcc.c @@ -48,6 +48,7 @@ static const char help[] = " -Dsym[=val] define 'sym' with value 'val'\n" " -Usym undefine 'sym'\n" " -E preprocess only\n" + " -C keep comments (not yet implemented)\n" "Linker options:\n" " -Ldir add library path 'dir'\n" " -llib link with dynamic or static library 'lib'\n"