Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.123
 
1.124
 
MAIN:ragge:20080813202200
 
cc.c
_>208208 char *startfiles_S[] = STARTFILES_S;
 209209 char *endfiles_S[] = ENDFILES_S;
 210210 #endif
<> 211+#ifdef MULTITARGET
  212+char *mach = DEFMACH;
  213+struct cppmd {
  214+        char *mach;
  215+        char *cppmdadd[MAXCPPMDARGS];
  216+};
  217+
  218+struct cppmd cppmds[] = CPPMDADDS;
  219+#else
211220 char *cppmdadd[] = CPPMDADD;
<> 221+#endif
212222 #ifdef LIBCLIBS
 213223 char *libclibs[] = LIBCLIBS;
 214224 #else
     
 !
256266         char *assource;
 257267         char **pv, *ptemp[MAXOPT], **pvt;
 258268         int nc, nl, nas, i, j, c, nxo, na;
<> 269+#ifdef MULTITARGET
  270+        int k;
  271+#endif
259272 
 260273         i = nc = nl = nas = nxo = 0;
 261274         pv = ptemp;
     
 !
275288                                         printf("%s\n", VERSSTR);
 276289                                 else
 277290                                         error("unrecognized option %s",
<>278 -                                                argv[i]);
  291+                                            argv[i]);
279292                                 break;
 280293 
 281294                         case 'B': /* other search paths for binaries */
 282295                                 Bflag = &argv[i][2];
 283296                                 break;
 284297 
<> 298+#ifdef MULTITARGET
  299+                        case 'b':
  300+                                t = &argv[i][2];
  301+                                if (*t == '\0' && i + 1 < argc) {
  302+                                        t = argv[i+1];
  303+                                        i++;
  304+                                }
  305+                                if (strncmp(t, "?", 1) == 0) {
  306+                                        /* show machine targets */
  307+                                        printf("Available machine targets:");
  308+                                        for (j=0; cppmds[j].mach; j++)
  309+                                                printf(" %s",cppmds[j].mach);
  310+                                        printf("\n");
  311+                                        exit(0);
  312+                                }
  313+                                for (j=0; cppmds[j].mach; j++)
  314+                                        if (strcmp(t, cppmds[j].mach) == 0) {
  315+                                                mach = cppmds[j].mach;
  316+                                                break;
  317+                                        }
  318+                                if (cppmds[j].mach == NULL)
  319+                                        errorx(1, "unknown target arch %s", t);
  320+                                break;
  321+#endif
  322+
285323                         case 'X':
 286324                                 Xflag++;
 287325                                 break;
     
 !
402440                                         pgflag++;
 403441                                 else if (strcmp(argv[i], "-pthread") == 0)
 404442                                         pthreads++;
<>405 -                                else if (strcmp(argv[i], "-pipe") == 0) {
 406 -                                } else
  443+                                else if (strcmp(argv[i], "-pipe") == 0)
  444+                                        /* NOTHING YET */;
  445+                                else
407446                                         errorx(1, "unknown option %s", argv[i]);
 408447                                 break;
 409448 
     
 !
416455                                 else if (strcmp(t, "assembler-with-cpp") == 0)
 417456                                         ascpp = 1;
 418457 #ifdef notyet
<>419 -                                else if (strcmp(t, "c++")
  458+                                else if (strcmp(t, "c++") == 0)
420459                                         cxxflag++;
 421460 #endif
 422461                                 else
     
 !
559598                 signal(SIGINT, idexit);
 560599         if (signal(SIGTERM, SIG_IGN) != SIG_IGN)        /* terminate */
 561600                 signal(SIGTERM, idexit);
<> 601+#ifdef MULTITARGET
  602+        asprintf(&pass0, "%s%s%s", LIBEXECDIR, "/ccom_", mach);
  603+#endif
562604         pvt = pv;
 563605         for (i=0; i<nc; i++) {
 564606                 /*
     
 !
603645                         av[na++] = alist;
 604646                 for (j = 0; cppadd[j]; j++)
 605647                         av[na++] = cppadd[j];
<> 648+#ifdef MULTITARGET
  649+                for (k = 0; cppmds[k].mach; k++) {
  650+                        if (strcmp(cppmds[k].mach, mach) != 0)
  651+                                continue;
  652+                        for (j = 0; cppmds[k].cppmdadd[j]; j++)
  653+                                av[na++] = cppmds[k].cppmdadd[j];
  654+                        break;
  655+                }
  656+#else
606657                 for (j = 0; cppmdadd[j]; j++)
 607658                         av[na++] = cppmdadd[j];
<> 659+#endif
608660                 if (tflag)
 609661                         av[na++] = "-t";
 610662                 for(pv=ptemp; pv <pvt; pv++)
     
 !
814866                 {
 815867                         if (!nostartfiles) {
 816868 #ifdef CRT0FILE_PROFILE
<>817 -                                if (pgflag)
 818 -                                {
  869+                                if (pgflag) {
819870                                         av[j++] = Bprefix(crt0file_profile);
<>820 -                                }
 821 -                                else
  871+                                } else
<_822872 #endif
 823873                                 {
 824874 #ifdef CRT0FILE
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 11:18 +0200