Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.83
 
1.84
 
MAIN:ragge:20080413163540
 
cc.c
_>138138 int     exfail;
 139139 int     Xflag;
 140140 int     Werror;
<>141 -int     nostartfiles, Bstatic;
  141+int     nostartfiles, Bstatic, shared;
142142 int     nostdinc, nostdlib;
 143143 int     onlyas;
 144144 int     pthreads;
     
 !
154154 char *crt0file_profile = CRT0FILE_PROFILE;
 155155 char *startfiles[] = STARTFILES;
 156156 char *endfiles[] = ENDFILES;
<> 157+#ifdef STARTFILES_S
  158+char *startfiles_S[] = STARTFILES_S;
  159+char *endfiles_S[] = ENDFILES_S;
  160+#endif
157161 char *cppmdadd[] = CPPMDADD;
 158162 #ifdef LIBCLIBS
 159163 char *libclibs[] = LIBCLIBS;
     
 !
349353                         case 's':
 350354                                 if (strcmp(argv[i], "-static") == 0)
 351355                                         Bstatic = 1;
<>352 -                                else
  356+                                else if (strcmp(argv[i], "-shared") == 0) {
  357+                                        shared = 1;
  358+                                        nostdlib = 1;
  359+                                } else
353360                                         goto passa;
 354361                                 break;
 355362                         }
     
 !
575582                 if (vflag)
 576583                         av[j++] = "-v";
 577584                 av[j++] = "-X";
<>578 -                av[j++] = "-d";
 579 -                av[j++] = "-e";
 580 -                av[j++] = STARTLABEL;
 581 -                if (Bstatic == 0) { /* Dynamic linkage */
 582 -                        for (i = 0; dynlinker[i]; i++)
 583 -                                av[j++] = dynlinker[i];
 584 -                } else
 585 -                        av[j++] = "-Bstatic";
  585+                if (shared) {
  586+                        av[j++] = "-shared";
  587+                } else {
  588+                        av[j++] = "-d";
  589+                        av[j++] = "-e";
  590+                        av[j++] = STARTLABEL;
  591+                        if (Bstatic == 0) { /* Dynamic linkage */
  592+                                for (i = 0; dynlinker[i]; i++)
  593+                                        av[j++] = dynlinker[i];
  594+                        } else
  595+                                av[j++] = "-Bstatic";
  596+                }
586597                 if (outfile) {
 587598                         av[j++] = "-o";
 588599                         av[j++] = outfile;
 589600                 }
<>590 -                if (!nostartfiles) {
 591 -                        av[j++] = pgflag ? crt0file_profile : crt0file;
 592 -                        for (i = 0; startfiles[i]; i++)
 593 -                                av[j++] = startfiles[i];
  601+                if (shared) {
  602+#ifdef STARTFILES_S
  603+                        for (i = 0; startfiles_S[i]; i++)
  604+                                av[j++] = startfiles_S[i];
  605+#endif
  606+                } else {
  607+                        if (!nostartfiles) {
  608+                                av[j++] = pgflag ? crt0file_profile : crt0file;
  609+                                for (i = 0; startfiles[i]; i++)
  610+                                        av[j++] = startfiles[i];
  611+                        }
594612                 }
 595613                 i = 0;
 596614                 while(i<nl) {
     
 !
618636                                         av[j++] = libclibs[i];
 619637                         }
 620638                 }
<>621 -                if (!nostartfiles) {
 622 -                        for (i = 0; endfiles[i]; i++)
 623 -                                av[j++] = endfiles[i];
  639+                if (shared) {
  640+#ifdef STARTFILES_S
  641+                        for (i = 0; endfiles_S[i]; i++)
  642+                                av[j++] = endfiles_S[i];
  643+#endif
  644+                } else {
  645+                        if (!nostartfiles) {
  646+                                for (i = 0; endfiles[i]; i++)
  647+                                        av[j++] = endfiles[i];
  648+                        }
<_624649                 }
 625650                 av[j++] = 0;
 626651                 eflag |= callsys(ld, av);
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-28 11:10 +0100