]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
perl: enable _GNU_SOURCE define via d_gnulibc
authorAlexander Kanavin <alex.kanavin@gmail.com>
Mon, 12 May 2025 21:37:54 +0000 (14:37 -0700)
committerSteve Sakoman <steve@sakoman.com>
Tue, 13 May 2025 13:41:55 +0000 (06:41 -0700)
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 <alex@linutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6422e62fbc5c65a2165a72c97c880cfa9a80e957)
Signed-off-by: Peter Hurley <peter@meraki.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-devtools/perl/perl_5.34.3.bb

index f6ebbf2d16a7f5bcf0f4bbf0e6ca89f3096ea9f2..c8475fc450e2b9ad857f08c171c3c9704049e0d6 100644 (file)
@@ -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