From 1816286fb1740d5aff23683978da7740a666a4e4 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 21 May 2015 23:09:44 +0100 Subject: [PATCH] fcc: add --nostdio, correct -pedantic to --pedantic --- Library/tools/fcc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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); -- 2.34.1