Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.51
 
1.52
 
MAIN:ragge:20070909095718
 
cc.c
_>111111 int     Oflag;
 112112 int     kflag;  /* generate PIC code */
 113113 int     Mflag;  /* dependencies only */
<>114 -int     proflag;
  114+int     pgflag;
115115 int     exfail;
 116116 int     Xflag;
 117117 int     nostartfiles, Bstatic;
<>118 -int     nostdinc;
  118+int     nostdinc, nostdlib;
119119 int     onlyas;
<> 120+int     pthreads;
120121 
 121122 char    *pass0 = LIBEXECDIR "/ccom";
 122123 char    *passp = LIBEXECDIR "/cpp";
 123124 char    *Bflag;
<>124 -char    *sysinc;
125125 char *cppadd[] = CPPADD;
 126126 char *dynlinker[] = DYNLINKER;
 127127 char *crt0file = CRT0FILE;
     
 !
185185 
 186186                 case 'i':
 187187                         if (strcmp(argv[i], "-isystem") == 0) {
<>188 -                                sysinc = argv[++i];
  188+                                *pv++ = "-S";
  189+                                *pv++ = argv[++i];
  190+                        } else if (strcmp(argv[i], "-include") == 0) {
  191+                                *pv++ = "-i";
  192+                                *pv++ = argv[++i];
189193                         } else
 190194                                 goto passa;
 191195                         break;
     
 !
197201                 case 'n': /* handle -n flags */
 198202                         if (strcmp(argv[i], "-nostdinc") == 0)
 199203                                 nostdinc++;
<>200 -                        else if (strcmp(argv[i], "-nostartfiles") == 0)
  204+                        if (strcmp(argv[i], "-nostdlib") == 0) {
  205+                                nostdlib++;
  206+                                nostartfiles++;
  207+                        } else if (strcmp(argv[i], "-nostartfiles") == 0)
201208                                 nostartfiles = 1;
 202209                         else
 203210                                 goto passa;
 204211                         break;
 205212 
<> 213+                case 'p':
  214+                        if (strcmp(argv[i], "-pg") == 0)
  215+                                pgflag++;
  216+                        else if (strcmp(argv[i], "-pthread") == 0)
  217+                                pthreads++;
  218+                        else
  219+                                errorx(1, "unknown option %s", argv[i]);
  220+                        break;
  221+
206222                 case 'x':
 207223                         xlist[xnum++] = argv[i];
 208224                         break;
     
 !
221237                 case 'O':
 222238                         Oflag++;
 223239                         break;
<>224 -                case 'p':
 225 -                        proflag++;
 226 -                        break;
227240                 case 'E':
 228241                         Eflag++;
 229242                         break;
     
 !
248261                 case 'U':
 249262                 case 'C':
 250263                         *pv++ = argv[i];
<> 264+                        if (argv[i][2] == 0)
  265+                                *pv++ = argv[++i];
251266                         if (pv >= ptemp+MAXOPT)
 252267                                 {
 253268                                 error("Too many DIUC options");
     
 !
348363                 av[na++] = "-D__PCC__=" MKS(PCC_MAJOR);
 349364                 av[na++] = "-D__PCC_MINOR__=" MKS(PCC_MINOR);
 350365                 av[na++] = "-D__PCC_MINORMINOR__=" MKS(PCC_MINORMINOR);
<> 366+                if (getsuf(clist[i])=='S')
  367+                        av[na++] = "-D__ASSEMBLER__";
  368+                if (pthreads)
  369+                        av[na++] = "-D_PTHREADS";
351370                 if (Mflag)
 352371                         av[na++] = "-M";
<>353 -                if (!nostdinc)
 354 -                        av[na++] = "-S", av[na++] = STDINC;
 355 -                if (sysinc)
 356 -                        av[na++] = "-S", av[na++] = sysinc;
357372                 for (j = 0; cppadd[j]; j++)
 358373                         av[na++] = cppadd[j];
 359374                 for (j = 0; cppmdadd[j]; j++)
     
 !
362377                         av[na++] = "-t";
 363378                 for(pv=ptemp; pv <pvt; pv++)
 364379                         av[na++] = *pv;
<> 380+                if (!nostdinc)
  381+                        av[na++] = "-S", av[na++] = STDINC;
365382                 av[na++] = clist[i];
 366383                 if (!Eflag && !Mflag)
 367384                         av[na++] = tmp4;
     
 !
479496                 if (gflag)
 480497                         av[j++] = "-lg";
 481498 #endif
<>482 -                for (i = 0; libclibs[i]; i++)
 483 -                        av[j++] = libclibs[i];
  499+                if (pthreads)
  500+                        av[j++] = "-lpthread";
  501+                if (!nostdlib)
  502+                        for (i = 0; libclibs[i]; i++)
  503+                                av[j++] = libclibs[i];
<_484504                 if (!nostartfiles) {
 485505                         for (i = 0; endfiles[i]; i++)
 486506                                 av[j++] = endfiles[i];
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-10-31 18:09 +0100