diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2019-10-07 15:29:33 -0400 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2019-10-07 15:36:03 -0400 |
commit | e06f2fbde7d9d8ca3d363035dacbbc4b81e29c9a (patch) | |
tree | df1831d7edb2fe3f0273f19faa38dfdf78584b50 /newlib/configure.in | |
parent | 175b215e054a8cee50d91317f3af22a3b2c3d320 (diff) | |
download | newlib-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.in')
-rw-r--r-- | newlib/configure.in | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/newlib/configure.in b/newlib/configure.in index adce036..ec5039d 100644 --- a/newlib/configure.in +++ b/newlib/configure.in @@ -66,6 +66,16 @@ AC_ARG_ENABLE(newlib-mb, *) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;; esac], [newlib_mb=])dnl +dnl Enable verification of successful memory allocation for _REENT_CHECK family of macros +dnl Support --enable-newlib-reent-check-verify +AC_ARG_ENABLE(newlib-reent-check-verify, +[ --enable-newlib-reent-check-verify enable checking of _REENT_CHECK memory allocation], +[case "${enableval}" in + yes) newlib_reent_check_verify=yes;; + no) newlib_reent_check_verify=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for newlib-reent-check-verify option) ;; + esac], [newlib_reent_check_verify=])dnl + dnl Support --enable-newlib-iconv-encodings AC_ARG_ENABLE(newlib-iconv-encodings, [ --enable-newlib-iconv-encodings enable specific comma-separated list of bidirectional iconv encodings to be built-in], @@ -396,6 +406,10 @@ if test "${newlib_elix_level}" -gt "0"; then AC_DEFINE_UNQUOTED(_ELIX_LEVEL,${newlib_elix_level}) fi +if test "${newlib_reent_check_verify}" = "yes"; then +AC_DEFINE_UNQUOTED(_REENT_CHECK_VERIFY) +fi + if test "${newlib_io_c99_formats}" = "yes"; then AC_DEFINE_UNQUOTED(_WANT_IO_C99_FORMATS) fi |