Changeset 87afe92


Ignore:
Timestamp:
Feb 13, 2009, 12:31:34 AM (11 years ago)
Author:
Sam Hartman <hartmans@mit.edu>
Branches:
master, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
9d12aa5, 3b80321
Parents:
eef5b52
git-author:
Sam Hartman <hartmans@mit.edu> (02/12/09 23:22:12)
git-committer:
Sam Hartman <hartmans@mit.edu> (02/13/09 00:31:34)
Message:
Support -fstack-protector

Gcc and some Linux environments support a -fstack-protector option to
guard against buffer overflows.  Sometimes this requires linking
against -lssp.  When this option works, use it in the build.  Users
may set PROTECT_CFLAGS to override.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    rd54035d r87afe92  
    4545        AC_MSG_RESULT(no)
    4646fi
     47PROTECT_CFLAGS=${PROTECT_CFLAGS-"-fstack-protector"}
     48SAVE_CFLAGS=$CFLAGS
     49CFLAGS="$CFLAGS $PROTECT_CFLAGS"
     50AC_MSG_CHECKING(whether protection cflags work)
     51AC_COMPILE_IFELSE(int i;,
     52    [AC_MSG_RESULT(yes)],
     53    [AC_MSG_RESULT(no)
     54    CFLAGS=$SAVE_CFLAGS])
    4755
     56
     57AC_CHECK_LIB(ssp, __stack_chk_guard)
    4858AC_CHECK_LIB(ncursesw, initscr,, AC_MSG_ERROR(No libncursesw found.))
    4959AC_CHECK_LIB(com_err, com_err)
Note: See TracChangeset for help on using the changeset viewer.