commit 5d1e33b49e2a382979ecfca1266052e94cdf7ef0
Author:     Quentin Rameau <[email protected]>
AuthorDate: Wed Jan 25 12:09:40 2017 +0100
Commit:     Quentin Rameau <[email protected]>
CommitDate: Wed Jan 25 12:09:40 2017 +0100

    [cc1] remove per-calling name different behaviour
    
    We don't produce a cpp binary anymore, only cc1-ARCH, so we don't need
    this anymore.

diff --git a/cc1/main.c b/cc1/main.c
index baadd53..020d557 100644
--- a/cc1/main.c
+++ b/cc1/main.c
@@ -15,7 +15,7 @@ char *argv0;
 int warnings;
 jmp_buf recover;
 
-static char *name, *output;
+static char *output;
 static struct items uflags;
 int onlycpp;
 
@@ -44,11 +44,8 @@ defmacro(char *macro)
 static void
 usage(void)
 {
-       die(!strcmp(name, "cpp") ?
-           "usage: cpp [-wd] [-D def[=val]]... [-U def]... [-I dir]... "
-           "[input]" :
-           "usage: cc1 [-Ewd] [-D def[=val]]... [-U def]... [-I dir]... "
-           "[-o output] [input]");
+       die("usage: cc1-" ARCH " [-Ewd] [-D def[=val]]... [-U def]... "
+           "[-I dir]... [-o output] [input]");
 }
 
 int
@@ -61,9 +58,6 @@ main(int argc, char *argv[])
        ilex();
        icpp();
 
-       /* if run as cpp, only run the preprocessor */
-       name = (cp = strrchr(*argv, '/')) ? cp + 1 : *argv;
-
        ARGBEGIN {
        case 'D':
                defmacro(EARGF(usage()));
@@ -96,9 +90,6 @@ main(int argc, char *argv[])
        if (output && !freopen(output, "w", stdout))
                die("error opening output: %s", strerror(errno));
 
-       if (!strcmp(name, "cpp"))
-               onlycpp = 1;
-
        for (i = 0; i < uflags.n; ++i)
                undefmacro(uflags.s[i]);
 

Reply via email to