IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34003


Ignore:
Timestamp:
Jun 11, 2012, 1:25:06 PM (14 years ago)
Author:
eugene
Message:

add debug-build option to remove -Werror from CFLAGS: for debugging the build process

Location:
branches/eam_branches/ipp-20120601
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120601/psLib/m4/ipp_stdopts.m4

    r33997 r34003  
    11
    2     dnl this is currently written to override an user-defined CFLAGS, is that OK?
    32    dnl this is currently written to override an user-defined LDFLAGS, is that OK?
    43
    54AC_DEFUN([IPP_STDCFLAGS],
    65[
     6    dnl this section currently overrides a user-defined CFLAGS
    77    AC_ARG_ENABLE(optimize,
    88      [AS_HELP_STRING(--enable-optimize,enable compiler optimization)],
     
    1212        if test x"${CFLAGS}" == x; then
    1313          CFLAGS="-pipe -O0 -g"
     14        fi
     15      ]
     16    )
     17    AC_ARG_ENABLE(debug-build,
     18      [AS_HELP_STRING(--enable-debug-build,enable debug build: ie disable Werror)],
     19      [AC_MSG_RESULT(debug build enabled)
     20        if test x"${CFLAGS}" == x; then
     21          CFLAGS="-Wall"
     22        else
     23          CFLAGS="${CFLAGS=} -Wall"
     24        fi
     25      ],
     26      [AC_MSG_RESULT([compile optimization disabled])
     27        if test x"${CFLAGS}" == x; then
     28          CFLAGS="-Wall -Werror"
     29        else
     30          CFLAGS="${CFLAGS=} -Wall -Werror"
    1431        fi
    1532      ]
  • branches/eam_branches/ipp-20120601/psconfig/psbuild

    r31466 r34003  
    99$optimize = 0;
    1010$profile = 0;
     11$no_as_needed = 0;
     12$debug_build = 0;
    1113$developer = 0;
    1214$magic = 0;
     
    7274    if ($ARGV[0] eq "-profile") {
    7375        $profile = 1;
     76        shift; next;
     77    }
     78    if ($ARGV[0] eq "-no-as-needed") {
     79        $no_as_needed = 1;
     80        shift; next;
     81    }
     82    if ($ARGV[0] eq "-debug-build") {
     83        $debug_build = 1;
    7484        shift; next;
    7585    }
     
    262272    if ($optimize) { $psopts = "$psopts --enable-optimize"; }
    263273    if ($profile)  { $psopts = "$psopts --enable-profile --disable-shared --enable-static"; }
     274    if ($debug_build)  { $psopts = "$psopts --enable-debug_build"; }
     275    if ($no_as_needed)  { $psopts = "$psopts --enable-no-as-needed"; }
    264276    $psopts .= " --disable-version" if $offline;
    265277
     
    479491    print STDERR "     : -optimize          : set flags for optimized code\n";
    480492    print STDERR "     : -profile           : set flags for profiling\n";
     493    print STDERR "     : -debug-build       : set flags for debug build (Wall, but not Werror; use to find and fix warnings from Wall)\n";
     494    print STDERR "     : -no-as-needed      : add --no-as-needed flag to gcc (to disable default --as-needed flags from Ubuntu, etc)\n";
    481495    print STDERR "     : -only (module)     : only build the specified module\n";
    482496    print STDERR "     : -start (module)    : begin build at specified module\n";
Note: See TracChangeset for help on using the changeset viewer.