]> 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, 6 Jun 2022 12:01:26 +0000 (14:01 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 7 Jun 2022 20:11:57 +0000 (21:11 +0100)
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>
meta/recipes-devtools/perl/perl_5.36.0.bb

index 05668bc96671def9ccdc8b2bb8ef47275d1891a0..4456cdbcfbac26f87006cd9239193c99be69a977 100644 (file)
@@ -61,6 +61,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