aboutsummaryrefslogtreecommitdiff
path: root/newlib/configure
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2019-10-07 15:29:33 -0400
committerJeff Johnston <jjohnstn@redhat.com>2019-10-07 15:36:03 -0400
commite06f2fbde7d9d8ca3d363035dacbbc4b81e29c9a (patch)
treedf1831d7edb2fe3f0273f19faa38dfdf78584b50 /newlib/configure
parent175b215e054a8cee50d91317f3af22a3b2c3d320 (diff)
downloadnewlib-e06f2fbde7d9d8ca3d363035dacbbc4b81e29c9a.zip
newlib-e06f2fbde7d9d8ca3d363035dacbbc4b81e29c9a.tar.gz
newlib-e06f2fbde7d9d8ca3d363035dacbbc4b81e29c9a.tar.bz2
Allow verifying _REENT_CHECK macros memory allocation
- change sys/reent.h to replace _REENT_CHECK_DEBUG with _REENT_CHECK_VERIFY which when set asserts that any memory allocated is non-NULL and calls __assert_func directly - add new --enable-newlib-reent-check-verify configure option - add support for configure.host to specify default for newlib_reent_check_verify - add _REENT_CHECK_VERIFY macro support to acconfig.h and newlib.hin
Diffstat (limited to 'newlib/configure')
-rwxr-xr-xnewlib/configure24
1 files changed, 22 insertions, 2 deletions
diff --git a/newlib/configure b/newlib/configure
index 6eef23c..55c6642 100755
--- a/newlib/configure
+++ b/newlib/configure
@@ -788,6 +788,7 @@ enable_newlib_register_fini
enable_newlib_io_long_long
enable_newlib_io_long_double
enable_newlib_mb
+enable_newlib_reent_check_verify
enable_newlib_iconv_encodings
enable_newlib_iconv_from_encodings
enable_newlib_iconv_to_encodings
@@ -1463,6 +1464,7 @@ Optional Features:
--enable-newlib-io-long-long enable long long type support in IO functions like printf/scanf
--enable-newlib-io-long-double enable long double type support in IO functions printf/scanf
--enable-newlib-mb enable multibyte support
+ --enable-newlib-reent-check-verify enable checking of _REENT_CHECK memory allocation
--enable-newlib-iconv-encodings enable specific comma-separated list of bidirectional iconv encodings to be built-in
--enable-newlib-iconv-from-encodings enable specific comma-separated list of \"from\" iconv encodings to be built-in
--enable-newlib-iconv-to-encodings enable specific comma-separated list of \"to\" iconv encodings to be built-in
@@ -2310,6 +2312,17 @@ else
newlib_mb=
fi
+# Check whether --enable-newlib-reent-check-verify was given.
+if test "${enable_newlib_reent_check_verify+set}" = set; then :
+ enableval=$enable_newlib_reent_check_verify; case "${enableval}" in
+ yes) newlib_reent_check_verify=yes;;
+ no) newlib_reent_check_verify=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-reent-check-verify option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_reent_check_verify=
+fi
+
# Check whether --enable-newlib-iconv-encodings was given.
if test "${enable_newlib_iconv_encodings+set}" = set; then :
enableval=$enable_newlib_iconv_encodings; if test x${enableval} = x; then
@@ -11840,7 +11853,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11843 "configure"
+#line 11856 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11946,7 +11959,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11949 "configure"
+#line 11962 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12351,6 +12364,13 @@ _ACEOF
fi
+if test "${newlib_reent_check_verify}" = "yes"; then
+cat >>confdefs.h <<_ACEOF
+#define _REENT_CHECK_VERIFY 1
+_ACEOF
+
+fi
+
if test "${newlib_io_c99_formats}" = "yes"; then
cat >>confdefs.h <<_ACEOF
#define _WANT_IO_C99_FORMATS 1