From: Alexander Kanavin Date: Mon, 12 May 2025 21:37:54 +0000 (-0700) Subject: perl: enable _GNU_SOURCE define via d_gnulibc X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79dc3f42958bfefe03a8240e2a57501c38d2bd3c;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git perl: enable _GNU_SOURCE define via d_gnulibc This is needed to properly support memmem() and friends under musl as musl guards the declarations with _GNU_SOURCE define, and if the declarations are not present, gcc will issue warnings and generate assembly that assumes the functions return int (instead of e.g. void*), with catastrophic consequences at runtime. Signed-off-by: Alexander Kanavin Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie (cherry picked from commit 6422e62fbc5c65a2165a72c97c880cfa9a80e957) Signed-off-by: Peter Hurley Signed-off-by: Steve Sakoman --- diff --git a/meta/recipes-devtools/perl/perl_5.34.3.bb b/meta/recipes-devtools/perl/perl_5.34.3.bb index f6ebbf2d16..c8475fc450 100644 --- a/meta/recipes-devtools/perl/perl_5.34.3.bb +++ b/meta/recipes-devtools/perl/perl_5.34.3.bb @@ -70,6 +70,7 @@ do_configure:class-target() { -Dlibpth='${libdir} ${base_libdir}' \ -Dglibpth='${libdir} ${base_libdir}' \ -Alddlflags=' ${LDFLAGS}' \ + -Dd_gnulibc=define \ ${PACKAGECONFIG_CONFARGS} #perl.c uses an ARCHLIB_EXP define to generate compile-time code that