Print this page
8411 Build should warn when linking against libraries outside proto area

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/cw/cw.c
          +++ new/usr/src/tools/cw/cw.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2011, Richard Lowe.
       24 + * Copyright 2017 RackTop Systems.
  24   25   */
  25   26  /*
  26   27   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  27   28   * Use is subject to license terms.
  28   29   */
  29   30  
  30   31  /*
  31   32   * Wrapper for the GNU C compiler to make it accept the Sun C compiler
  32   33   * arguments where possible.
  33   34   *
  34   35   * Since the translation is inexact, this is something of a work-in-progress.
  35   36   *
  36   37   */
  37   38  
  38   39  /* If you modify this file, you must increment CW_VERSION */
  39      -#define CW_VERSION      "1.30"
       40 +#define CW_VERSION      "1.31"
  40   41  
  41   42  /*
  42   43   * -#           Verbose mode
  43   44   * -###         Show compiler commands built by driver, no compilation
  44   45   * -A<name[(tokens)]>   Preprocessor predicate assertion
  45   46   * -B<[static|dynamic]> Specify dynamic or static binding
  46   47   * -C           Prevent preprocessor from removing comments
  47   48   * -c           Compile only - produce .o files, suppress linking
  48   49   * -cg92        Alias for -xtarget=ss1000
  49   50   * -D<name[=token]>     Associate name with token as if by #define
↓ open down ↓ 1337 lines elided ↑ open up ↑
1387 1388                                      *arg == '\0')
1388 1389                                          error("-Y");
1389 1390                                  ctx->i_oldargc--;
1390 1391                                  arglen = strlen(arg + 1);
1391 1392                          } else {
1392 1393                                  arg += 2;
1393 1394                          }
1394 1395                          /* Just ignore -YS,... for now */
1395 1396                          if (strncmp(arg, "S,", 2) == 0)
1396 1397                                  break;
     1398 +                        /* Reformat -YP or GCC will moan */
     1399 +                        if (strncmp(arg, "P,", 2) == 0) {
     1400 +                                char *s;
     1401 +                                (void) asprintf(&s, "-Y%s", arg);
     1402 +                                newae(ctx->i_ae, s);
     1403 +                                free(s);
     1404 +                                break;
     1405 +                        }
1397 1406                          if (strncmp(arg, "l,", 2) == 0) {
1398 1407                                  char *s = strdup(arg);
1399 1408                                  s[0] = '-';
1400 1409                                  s[1] = 'B';
1401 1410                                  newae(ctx->i_ae, s);
1402 1411                                  free(s);
1403 1412                                  break;
1404 1413                          }
1405 1414                          if (strncmp(arg, "I,", 2) == 0) {
1406 1415                                  char *s = strdup(arg);
↓ open down ↓ 512 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX