live-bootstrap/steps/perl-5.17.4/patches/duplicate-invlists-defn.patch
2025-10-06 12:21:45 +11:00

23 lines
835 B
Diff

SPDX-FileCopyrightText: 2025 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: Artistic-1.0
The problem this patch solves is a duplicate definition of
NonL1_Perl_Non_Final_Folds_invlist in the final binary.
Why this problem does not occur when this code was written is not clear.
Most likely cause is changed GCC behaviour.
To solve this, rather than including charclass_invlists.h, have a opaque
definition of the array.
--- perl-5.17.4/ext/re/Makefile.PL 2025-08-22 23:08:38.443022450 +1000
+++ perl-5.17.4/ext/re/Makefile.PL 2025-08-23 11:26:37.737298348 +1000
@@ -31,6 +31,7 @@
re_comp.c : $regcomp_c
- \$(RM_F) re_comp.c
\$(CP) $regcomp_c re_comp.c
+ sed -i '/charclass_invlists.h/ s/.*/UV NonL1_Perl_Non_Final_Folds_invlist[];/' re_comp.c
re_comp\$(OBJ_EXT) : re_comp.c dquote_static.c inline_invlist.c