Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.23
 
1.24
 
MAIN:ragge:20041120105845
 
cc.c
_>5656 #include <unistd.h>
 5757 #include <stdlib.h>
 5858 #include <sys/wait.h>
<> 59+
  60+#include "ccconfig.h"
5961 /* C command */
 6062 
 6163 #define MKS(x) _MKS(x)
     
 !
6870 #define PCC_MAJOR 1
 6971 #define STDINC    "/usr/include"
 7072 
<>71 -#if defined(__NetBSD__)
 72 -#if defined(__i386__)
 73 -char *cppadd[] = {
 74 -        "-D__NetBSD__", "-D__ELF__", "-D__i386__", NULL,
 75 -};
 76 -#else
 77 -#error port to netbsd arch
 78 -#endif
 79 -#else
 80 -#error port to new os
 81 -#endif
 82 -
8373 #define SBSIZE 10000
 8474 #define MAXINC 100
 8575 #define MAXFIL 100
     
 !
123113 int     Eflag;
 124114 int     Oflag;
 125115 int     proflag;
<>126 -int     noflflag;
127116 int     exfail;
 128117 int     Xflag;
 129118 int     nostartfiles, Bstatic;
 130119 int     nostdinc;
 131120 
 132121 char    *pass0 = LIBEXECDIR "/ccom";
 133122 char    *passp = LIBEXECDIR "/cpp";
<>134 -char    *pref = "/usr/lib/crt0.o";
 135 -char    *dynlinker = "/usr/libexec/ld.elf_so";
136123 char    *sysinc;
 137124 
 138125 int
     
 !
226213                         cflag++;
 227214                         break;
 228215 
<> 216+#if 0
229217                 case '2':
 230218                         if(argv[i][2] == '\0')
 231219                                 pref = "/lib/crt2.o";
     
 !
234222                                 f20 = 1;
 235223                         }
 236224                         break;
<> 225+#endif
237226                 case 'D':
 238227                 case 'I':
 239228                 case 'U':
     
 !
295284                 errorx("output file will be clobbered", "", 8);
 296285 
 297286         if (gflag) Oflag = 0;
<>298 -        if (noflflag)
 299 -                pref = proflag ? "/lib/fmcrt0.o" : "/lib/fcrt0.o";
 300 -        else if (proflag)
  287+#if 0
  288+        if (proflag)
301289                 pref = "/lib/mcrt0.o";
<> 290+#endif
302291         if(nc==0)
 303292                 goto nocom;
 304293         if (pflag==0) {
     
 !
345334                         av[na++] = "-S", av[na++] = sysinc;
 346335                 for (j = 0; cppadd[j]; j++)
 347336                         av[na++] = cppadd[j];
<> 337+                for (j = 0; cppmdadd[j]; j++)
  338+                        av[na++] = cppmdadd[j];
348339                 if (tflag)
 349340                         av[na++] = "-t";
 350341                 for(pv=ptemp; pv <pvt; pv++)
     
 !
429420          */
 430421 nocom:
 431422         if (cflag==0 && nl!=0) {
<>432 -                i = 0;
433423                 j = 0;
 434424                 av[j++] = "ld";
 435425                 av[j++] = "-X";
 436426                 av[j++] = "-d";
 437427                 av[j++] = "-e";
 438428                 av[j++] = "__start";
 439429                 if (Bstatic == 0) { /* Dynamic linkage */
<>440 -                        av[j++] = "-dynamic-linker";
 441 -                        av[j++] = dynlinker;
  430+                        for (i = 0; dynlinker[i]; i++)
  431+                                av[j++] = dynlinker[i];
442432                 }
 443433                 if (outfile) {
 444434                         av[j++] = "-o";
 445435                         av[j++] = outfile;
 446436                 }
 447437                 if (!nostartfiles) {
<>448 -                        av[j++] = pref;
 449 -                        av[j++] = "/usr/lib/crti.o";
 450 -                        av[j++] = "/usr/lib/crtbegin.o";
  438+                        av[j++] = crt0file;
  439+                        for (i = 0; startfiles[i]; i++)
  440+                                av[j++] = startfiles[i];
451441                 }
<> 442+                i = 0;
452443                 while(i<nl) {
 453444                         av[j++] = llist[i++];
 454445                         if (j >= MAXAV)
     
 !
460451 #endif
 461452                 av[j++] = "-lc";
 462453                 if (!nostartfiles) {
<>463 -                        av[j++] = "/usr/lib/crtend.o";
 464 -                        av[j++] = "/usr/lib/crtn.o";
  454+                        for (i = 0; endfiles[i]; i++)
  455+                                av[j++] = endfiles[i];
<_465456                 }
 466457                 if(f20)
 467458                         av[j++] = "-l2";
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 13:48 +0100