Files
rk35xx-android14/external/ltp/m4/ltp-fortify_source.m4
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

21 lines
495 B
Plaintext

dnl SPDX-License-Identifier: GPL-2.0-or-later
dnl Copyright (c) 2013 Cyril Hrubis <chrubis@suse.cz>
AC_DEFUN([LTP_CHECK_FORTIFY_SOURCE],[
AC_MSG_CHECKING(whether to define _FORTIFY_SOURCE=2)
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <stdio.h>
int main(void)
{
#if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
return 0;
#else
# error Compiling without optimalizations
#endif
}
])],[CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
])