~mirabilos/dietlibc/MAIN

« back to all changes in this revision

Viewing changes to diet.c

  • Committer: leitner
  • Date: 2018-02-01 02:03:38 UTC
  • Revision ID: leitner-20180201020338-54jxlisiggc938hv
split off stackgap-g.o, don't compile valgrind stuff into stackgap.o,
  diet chooses depending on presence of -g
move stackguard var from .data to .bss
remove gcc 7.3 warning from lib/__v_printf.c

Show diffs side-by-side

added added

removed removed

Lines of Context:
244
244
#ifdef WANT_DYNAMIC
245
245
      char *d,*e,*f;
246
246
#endif
 
247
      char *g=0;
247
248
/* we need to add -I... if the command line contains -c, -S or -E */
248
249
      for (i=2; i<argc; ++i) {
249
 
        if (argv[i][0]=='-' && argv[i][1]=='M')
250
 
          goto pp;
 
250
        if (argv[i][0]=='-') {
 
251
          if (argv[i][1]=='M')
 
252
            goto pp;
 
253
          else if (argv[i][1]=='g') {
 
254
            g=alloca(strlen(platform)+20);
 
255
            strcpy(g,platform);
 
256
            strcat(g,"/stackgap-g.o");
 
257
          }
 
258
        }
251
259
        if (!strcmp(argv[i],"-pg"))
252
260
          profile=1;
253
 
        if (!strcmp(argv[i],"-c") || !strcmp(argv[i],"-S"))
 
261
        else if (!strcmp(argv[i],"-c") || !strcmp(argv[i],"-S"))
254
262
          compile=1;
255
 
        if (!strcmp(argv[i],"-E"))
 
263
        else if (!strcmp(argv[i],"-E"))
256
264
pp:
257
265
          preprocess=compile=1;
258
266
      }
349
357
        *dest++=safeguard2;
350
358
      }
351
359
#endif
352
 
      if (_link) { *dest++=b; }
 
360
      if (_link) { *dest++=b; if (g) *dest++=g; }
353
361
#ifdef WANT_DYNAMIC
354
362
      if (_link) { *dest++=d; }
355
363
#endif