From c3eae84e6d565de469e2141329751fc840bcd25e Mon Sep 17 00:00:00 2001 From: aoyama Date: Fri, 16 Apr 2021 12:05:32 +0000 Subject: [PATCH] Add a workaround to avoid wrong code generated by m88k gcc. NATIVE_TO_UNI is defined as follows in utf8.h: -- #define NATIVE_TO_UNI(ch) ((UV) ((ch) | 0)) -- and UV is 'unsigned long' on m88k. Details are at: https://github.com/Perl/perl5/issues/18655 help and ok afresh1@ --- gnu/usr.bin/perl/utf8.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnu/usr.bin/perl/utf8.h b/gnu/usr.bin/perl/utf8.h index 01bf447a614..97bccd08625 100644 --- a/gnu/usr.bin/perl/utf8.h +++ b/gnu/usr.bin/perl/utf8.h @@ -316,7 +316,12 @@ C is Unicode if above 255; otherwise is platform-native. =cut */ +#if defined(__m88k__) +/* XXX workaround: m88k gcc3 produces wrong code with NATIVE_TO_UNI() */ +#define UVCHR_IS_INVARIANT(cp) (OFFUNI_IS_INVARIANT(cp)) +#else /* the original one */ #define UVCHR_IS_INVARIANT(cp) (OFFUNI_IS_INVARIANT(NATIVE_TO_UNI(cp))) +#endif /* Internal macro to be used only in this file to aid in constructing other * publicly accessible macros. -- 2.20.1