mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 04:34:41 +02:00
Update autoconf scripts
1. Since AX_HARDEN is called always, moved the few items set in configure for gcc-hardening to AX_HARDEN. 2. Dropped the macros that AX_DEBUG was setting that we haven't been using and aren't using now.
This commit is contained in:
12
configure.ac
12
configure.ac
@@ -95,6 +95,7 @@ AC_TYPE_UINT8_T
|
|||||||
AM_PROG_AS
|
AM_PROG_AS
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
LT_LIB_M
|
LT_LIB_M
|
||||||
|
AX_HARDEN_CC_COMPILER_FLAGS
|
||||||
|
|
||||||
OPTIMIZE_CFLAGS="-Os -fomit-frame-pointer"
|
OPTIMIZE_CFLAGS="-Os -fomit-frame-pointer"
|
||||||
OPTIMIZE_FAST_CFLAGS="-O2 -fomit-frame-pointer"
|
OPTIMIZE_FAST_CFLAGS="-O2 -fomit-frame-pointer"
|
||||||
@@ -1554,17 +1555,6 @@ fi
|
|||||||
|
|
||||||
LIB_SOCKET_NSL
|
LIB_SOCKET_NSL
|
||||||
|
|
||||||
AC_ARG_ENABLE([gcc-hardening],
|
|
||||||
AS_HELP_STRING(--enable-gcc-hardening, Enable compiler security checks (default: disabled)),
|
|
||||||
[if test x$enableval = xyes; then
|
|
||||||
AM_CFLAGS="$AM_CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all"
|
|
||||||
AM_CFLAGS="$AM_CFLAGS -fwrapv -fPIE -Wstack-protector"
|
|
||||||
AM_CFLAGS="$AM_CFLAGS --param ssp-buffer-size=1"
|
|
||||||
LDFLAGS="$LDFLAGS -pie"
|
|
||||||
fi])
|
|
||||||
|
|
||||||
AX_HARDEN_CC_COMPILER_FLAGS
|
|
||||||
|
|
||||||
# link to ws2_32 if on mingw
|
# link to ws2_32 if on mingw
|
||||||
case $host_os in
|
case $host_os in
|
||||||
*mingw32)
|
*mingw32)
|
||||||
|
@@ -51,9 +51,7 @@ AC_DEFUN([AX_DEBUG],
|
|||||||
[AS_HELP_STRING([--enable-debug],
|
[AS_HELP_STRING([--enable-debug],
|
||||||
[Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],
|
[Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],
|
||||||
[ax_enable_debug=yes
|
[ax_enable_debug=yes
|
||||||
AC_DEFINE([DEBUG],[1],[Define to 1 to enable debugging code.])
|
AC_DEFINE([DEBUG],[1],[Define to 1 to enable debugging code.])],
|
||||||
AX_ADD_AM_MACRO([AM_YFLAGS += --debug])
|
|
||||||
AX_ADD_AM_MACRO([AM_CPPFLAGS += -D_GLIBCXX_DEBUG])],
|
|
||||||
[ax_enable_debug=no
|
[ax_enable_debug=no
|
||||||
AC_SUBST([MCHECK])
|
AC_SUBST([MCHECK])
|
||||||
AC_DEFINE([DEBUG],[0],[Define to 1 to enable debugging code.])])
|
AC_DEFINE([DEBUG],[0],[Define to 1 to enable debugging code.])])
|
||||||
|
@@ -156,6 +156,7 @@
|
|||||||
AX_APPEND_COMPILE_FLAGS([-Wunused-variable],,[$ax_append_compile_cflags_extra])
|
AX_APPEND_COMPILE_FLAGS([-Wunused-variable],,[$ax_append_compile_cflags_extra])
|
||||||
AX_APPEND_COMPILE_FLAGS([-Wwrite-strings],,[$ax_append_compile_cflags_extra])
|
AX_APPEND_COMPILE_FLAGS([-Wwrite-strings],,[$ax_append_compile_cflags_extra])
|
||||||
AX_APPEND_COMPILE_FLAGS([-fwrapv],,[$ax_append_compile_cflags_extra])
|
AX_APPEND_COMPILE_FLAGS([-fwrapv],,[$ax_append_compile_cflags_extra])
|
||||||
|
AX_APPEND_COMPILE_FLAGS([-fPIE],,[$ax_append_compile_cflags_extra])
|
||||||
AC_LANG_POP
|
AC_LANG_POP
|
||||||
])
|
])
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user