From: Alan Cox Date: Thu, 21 May 2015 22:09:44 +0000 (+0100) Subject: fcc: add --nostdio, correct -pedantic to --pedantic X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=1816286fb1740d5aff23683978da7740a666a4e4;p=FUZIX.git fcc: add --nostdio, correct -pedantic to --pedantic --- diff --git a/Library/tools/fcc.c b/Library/tools/fcc.c index 106b9540..84e6c368 100644 --- a/Library/tools/fcc.c +++ b/Library/tools/fcc.c @@ -212,6 +212,7 @@ static int debug; static int pedantic; static int werror; static int unschar; +static int nostdio = 0; static char *rebuildname(const char *r, const char *i, char *ext) @@ -400,7 +401,10 @@ static void build_command(void) exit(1); } add_option("-o", target); - snprintf(buf, sizeof(buf), FCC_DIR "/lib/crt0%s.rel", platform); + if (nostdio) + snprintf(buf, sizeof(buf), FCC_DIR "/lib/crt0nostdio%s.rel", platform); + else + snprintf(buf, sizeof(buf), FCC_DIR "/lib/crt0%s.rel", platform); add_argument(mstrdup(buf)); } if (srchead) { @@ -502,8 +506,10 @@ int main(int argc, const char *argv[]) { werror = 1; else if (strcmp(p, "-funsigned-char") == 0) unschar = 1; - else if (strcmp(p, "-pedantic") == 0) + else if (strcmp(p, "--pedantic") == 0) pedantic = 1; + else if (strcmp(p, "--nostdio") == 0) + nostdio = 1; else { fprintf(stderr, "fcc: Unknown option '%s'.\n", p); exit(1);