Xorg libraries that use Xmalloc need to know if malloc(0) returns NULL or not,
and as this is a runtime test it can't be checked for. Previously
xorg-lib-common declared that malloc(0) did return NULL, but this isn't true for
eglibc (only uclibc).
Instead, use libc-specific overrides to pass the relevant option.
(ideally the check would use the autoconf cache so this can be stored in the site files)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
inherit autotools pkgconfig
-EXTRA_OECONF = "--enable-malloc0returnsnull \
- --disable-specs --with-groff=no --with-ps2pdf=no --with-fop=no --without-xmlto"
+EXTRA_OECONF = "--disable-specs --without-groff --without-ps2pdf --without-fop --without-xmlto"
+EXTRA_OECONF_append_libc-glibc = " --disable-malloc0returnsnull"
+EXTRA_OECONF_append_libc-uclibc = " --enable-malloc0returnsnull"
python () {
whitelist = [ "pixman", "libpciaccess" ]