Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.65
 
1.66
 
MAIN:ragge:20071003204948
 
cc.c
_>152152         i = nc = nl = nxo = 0;
 153153         pv = ptemp;
 154154         while(++i < argc) {
<>155 -                if (argv[i][0] == '-')
 156 -                switch (argv[i][1]) {
 157 -                default:
 158 -                        goto passa;
  155+                if (argv[i][0] == '-') {
  156+                        switch (argv[i][1]) {
  157+                        default:
  158+                                goto passa;
  159+#ifdef notyet
  160+        /* must add library options first (-L/-l/...) */
  161+                                error("unrecognized option `-%c'", argv[i][1]);
  162+                                break;
  163+#endif
159164 
<>160 -                case 'B': /* other search paths for binaries */
 161 -                        Bflag = &argv[i][2];
 162 -                        break;
  165+                        case 'B': /* other search paths for binaries */
  166+                                Bflag = &argv[i][2];
  167+                                break;
163168 
<>164 -                case 'X':
 165 -                        Xflag++;
 166 -                        break;
 167 -                case 'W': /* Ignore (most of) W-flags */
 168 -                        if (strncmp(argv[i], "-Wl,", 4) == 0) {
 169 -                                /* options to the linker */
 170 -                                t = &argv[i][4];
 171 -                                while ((u = strchr(t, ','))) {
 172 -                                        *u++ = 0;
  169+                        case 'X':
  170+                                Xflag++;
  171+                                break;
  172+                        case 'W': /* Ignore (most of) W-flags */
  173+                                if (strncmp(argv[i], "-Wl,", 4) == 0) {
  174+                                        /* options to the linker */
  175+                                        t = &argv[i][4];
  176+                                        while ((u = strchr(t, ','))) {
  177+                                                *u++ = 0;
  178+                                                llist[nl++] = t;
  179+                                                t = u;
  180+                                        }
173181                                         llist[nl++] = t;
<>174 -                                        t = u;
175182                                 }
<>176 -                                llist[nl++] = t;
 177 -                        }
 178 -                        break;
  183+                                break;
179184 
<>180 -                case 'f': /* GCC compatibility flags */
 181 -                        if (strcmp(argv[i], "-fPIC") == 0)
 182 -                                kflag = F_PIC;
 183 -                        if (strcmp(argv[i], "-fpic") == 0)
 184 -                                kflag = F_pic;
 185 -                        /* silently ignore the rest */
 186 -                        break;
  185+                        case 'f': /* GCC compatibility flags */
  186+                                if (strcmp(argv[i], "-fPIC") == 0)
  187+                                        kflag = F_PIC;
  188+                                if (strcmp(argv[i], "-fpic") == 0)
  189+                                        kflag = F_pic;
  190+                                /* silently ignore the rest */
  191+                                break;
187192 
<>188 -                case 'g': /* create debug output */
 189 -                        gflag++;
 190 -                        break;
  193+                        case 'g': /* create debug output */
  194+                                gflag++;
  195+                                break;
191196 
<>192 -                case 'i':
 193 -                        if (strcmp(argv[i], "-isystem") == 0) {
 194 -                                *pv++ = "-S";
 195 -                                *pv++ = argv[++i];
 196 -                        } else if (strcmp(argv[i], "-include") == 0) {
 197 -                                *pv++ = "-i";
 198 -                                *pv++ = argv[++i];
 199 -                        } else
 200 -                                goto passa;
 201 -                        break;
  197+                        case 'i':
  198+                                if (strcmp(argv[i], "-isystem") == 0) {
  199+                                        *pv++ = "-S";
  200+                                        *pv++ = argv[++i];
  201+                                } else if (strcmp(argv[i], "-include") == 0) {
  202+                                        *pv++ = "-i";
  203+                                        *pv++ = argv[++i];
  204+                                } else
  205+                                        goto passa;
  206+                                break;
202207 
<>203 -                case 'k': /* generate PIC code */
 204 -                        kflag = F_pic;
 205 -                        break;
  208+                        case 'k': /* generate PIC code */
  209+                                kflag = F_pic;
  210+                                break;
206211 
<>207 -                case 'n': /* handle -n flags */
 208 -                        if (strcmp(argv[i], "-nostdinc") == 0)
 209 -                                nostdinc++;
 210 -                        else if (strcmp(argv[i], "-nostdlib") == 0) {
 211 -                                nostdlib++;
 212 -                                nostartfiles++;
 213 -                        } else if (strcmp(argv[i], "-nostartfiles") == 0)
 214 -                                nostartfiles = 1;
 215 -                        else
 216 -                                goto passa;
 217 -                        break;
  212+                        case 'n': /* handle -n flags */
  213+                                if (strcmp(argv[i], "-nostdinc") == 0)
  214+                                        nostdinc++;
  215+                                else if (strcmp(argv[i], "-nostdlib") == 0) {
  216+                                        nostdlib++;
  217+                                        nostartfiles++;
  218+                                } else if (strcmp(argv[i], "-nostartfiles") == 0)
  219+                                        nostartfiles = 1;
  220+                                else
  221+                                        goto passa;
  222+                                break;
218223 
<>219 -                case 'p':
 220 -                        if (strcmp(argv[i], "-pg") == 0)
 221 -                                pgflag++;
 222 -                        else if (strcmp(argv[i], "-pthread") == 0)
 223 -                                pthreads++;
 224 -                        else
 225 -                                errorx(1, "unknown option %s", argv[i]);
 226 -                        break;
  224+                        case 'p':
  225+                                if (strcmp(argv[i], "-pg") == 0)
  226+                                        pgflag++;
  227+                                else if (strcmp(argv[i], "-pthread") == 0)
  228+                                        pthreads++;
  229+                                else
  230+                                        errorx(1, "unknown option %s", argv[i]);
  231+                                break;
227232 
<>228 -                case 'x':
 229 -                        xlist[xnum++] = argv[i];
 230 -                        break;
 231 -                case 't':
 232 -                        tflag++;
 233 -                        break;
 234 -                case 'S':
 235 -                        sflag++;
 236 -                        cflag++;
 237 -                        break;
 238 -                case 'o':
 239 -                        if (outfile)
 240 -                                errorx(8, "too many -o");
 241 -                        outfile = argv[++i];
 242 -                        break;
 243 -                case 'O':
 244 -                        Oflag++;
 245 -                        break;
 246 -                case 'E':
 247 -                        Eflag++;
 248 -                        break;
 249 -                case 'P':
 250 -                        pflag++;
 251 -                        *pv++ = argv[i];
 252 -                case 'c':
 253 -                        cflag++;
 254 -                        break;
  233+                        case 'x':
  234+                                xlist[xnum++] = argv[i];
  235+                                break;
  236+                        case 't':
  237+                                tflag++;
  238+                                break;
  239+                        case 'S':
  240+                                sflag++;
  241+                                cflag++;
  242+                                break;
  243+                        case 'o':
  244+                                if (outfile)
  245+                                        errorx(8, "too many -o");
  246+                                outfile = argv[++i];
  247+                                break;
  248+                        case 'O':
  249+                                Oflag++;
  250+                                break;
  251+                        case 'E':
  252+                                Eflag++;
  253+                                break;
  254+                        case 'P':
  255+                                pflag++;
  256+                                *pv++ = argv[i];
  257+                        case 'c':
  258+                                cflag++;
  259+                                break;
255260 
 256261 #if 0
<>257 -                case '2':
 258 -                        if(argv[i][2] == '\0')
 259 -                                pref = "/lib/crt2.o";
 260 -                        else {
 261 -                                pref = "/lib/crt20.o";
 262 -                        }
 263 -                        break;
  262+                        case '2':
  263+                                if(argv[i][2] == '\0')
  264+                                        pref = "/lib/crt2.o";
  265+                                else {
  266+                                        pref = "/lib/crt20.o";
  267+                                }
  268+                                break;
264269 #endif
<>265 -                case 'C':
 266 -                        Cflag = 1;
 267 -                        break;
 268 -                case 'D':
 269 -                case 'I':
 270 -                case 'U':
 271 -                        *pv++ = argv[i];
 272 -                        if (argv[i][2] == 0)
 273 -                                *pv++ = argv[++i];
 274 -                        if (pv >= ptemp+MAXOPT)
 275 -                                {
 276 -                                error("Too many DIU options");
 277 -                                --pv;
  270+                        case 'C':
  271+                                Cflag = 1;
  272+                                break;
  273+                        case 'D':
  274+                        case 'I':
  275+                        case 'U':
  276+                                *pv++ = argv[i];
  277+                                if (argv[i][2] == 0)
  278+                                        *pv++ = argv[++i];
  279+                                if (pv >= ptemp+MAXOPT) {
  280+                                        error("Too many DIU options");
  281+                                        --pv;
278282                                 }
<>279 -                        break;
  283+                                break;
280284 
<>281 -                case 'M':
 282 -                        Mflag++;
 283 -                        break;
  285+                        case 'M':
  286+                                Mflag++;
  287+                                break;
284288 
<>285 -                case 'd':
 286 -                        dflag++;
 287 -                        strncpy(alist, argv[i], 19);
 288 -                        break;
 289 -                case 'v':
 290 -                        printf("%s\n", VERSSTR);
 291 -                        vflag++;
 292 -                        break;
  289+                        case 'd':
  290+                                dflag++;
  291+                                strncpy(alist, argv[i], 19);
  292+                                break;
  293+                        case 'v':
  294+                                printf("%s\n", VERSSTR);
  295+                                vflag++;
  296+                                break;
293297 
<>294 -                case 's':
 295 -                        if (strcmp(argv[i], "-static") == 0)
 296 -                                Bstatic = 1;
 297 -                        else
 298 -                                goto passa;
 299 -                        break;
  298+                        case 's':
  299+                                if (strcmp(argv[i], "-static") == 0)
  300+                                        Bstatic = 1;
  301+                                else
  302+                                        goto passa;
  303+                                break;
  304+                        }
300305                 } else {
 301306                 passa:
 302307                         t = argv[i];
     
 !
305310                         else if((c=getsuf(t))=='c' || c=='S' || c=='i' ||
 306311                             c=='s'|| Eflag) {
 307312                                 clist[nc++] = t;
<>308 -                                if (nc>=MAXFIL)
 309 -                                        {
  313+                                if (nc>=MAXFIL) {
310314                                         error("Too many source files");
 311315                                         exit(1);
<>312 -                                        }
  316+                                }
313317                                 t = setsuf(t, 'o');
 314318                         }
 315319                         if (nodup(llist, t)) {
 316320                                 llist[nl++] = t;
<>317 -                                if (nl >= MAXLIB)
 318 -                                        {
  321+                                if (nl >= MAXLIB) {
319322                                         error("Too many object/library files");
 320323                                         exit(1);
<>321 -                                        }
  324+                                }
<_322325                                 if (getsuf(t)=='o')
 323326                                         nxo++;
 324327                         }
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-09-02 21:08 +0200