diffutils: use malloc() and realloc() from libc as-is
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v3 2/2 diffutils: use malloc() and realloc() from libc as-is
From: Andre' Draszik <[email protected]>
diffutils' version of autoconf tries to run a test program to determine if malloc() and realloc() behave like in glibc, i.e. returning non-NULL when given 0 as size. Running a test program doesn't work when cross- compiling, so it defaults to assuming different behaviour and compiles wrappers around malloc() & realloc().
Given they behave the same in musl (these days), and given uClibc isn't supported anymore, we can specify the test-result, and avoid having to use diffutil's replacement functions.
jm_cv_func_working_malloc and jm_cv_func_working_realloc are similar to ac_cv_func_malloc_0_nonnull and ac_cv_func_realloc_0_nonnull, which oe-core sets in the site configuration in meta/site/, except that the former two are the flags for the older version of autoconf used by this package.
---
v3:
* update commit message
* don't make this musl specific
v2:
* switch to CACHED_CONFIGUREVARS instead of EXTRA_OECONF
--- recipes-extended/diffutils/diffutils_2.8.1.bb | 5 +++++ 1 file changed, 5 insertions(+)
recipes-extended/diffutils/diffutils_2.8.1.bb +5 -0
@@ -16,6 +16,11 @@ SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz \ SRC_URI[md5sum] = "71f9c5ae19b60608f6c7f162da86a428" SRC_URI[sha256sum] = "c5001748b069224dd98bf1bb9ee877321c7de8b332c8aad5af3e2a7372d23f5a" +CACHED_CONFIGUREVARS = "\ + jm_cv_func_working_malloc=yes \ + jm_cv_func_working_realloc=yes \ +" + do_configure_prepend () { chmod u+w ${S}/po/Makefile.in.in }
Signature · 1 line
2.23.0.rc1