xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-devtools/perl/files/0001-Fix-build-with-gcc-12.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFrom ee957eb9e4ec29a462cdbb2f3bbe29d4270534ef Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Mingli Yu <mingli.yu@windriver.com>
3*4882a593SmuzhiyunDate: Thu, 2 Jun 2022 13:01:37 +0800
4*4882a593SmuzhiyunSubject: [PATCH] proto.h: Fix build with gcc-12
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunFixes:
7*4882a593Smuzhiyun  In function 'dynprep',
8*4882a593Smuzhiyun    inlined from 'S_sortsv_flags_impl' at pp_sort.c:358:20,
9*4882a593Smuzhiyun    inlined from 'sortsv_amagic_i_ncmp' at pp_sort.c:572:5:
10*4882a593Smuzhiyun    pp_sort.c:1232:1: error: inlining failed in call to 'always_inline' 'S_amagic_i_ncmp': function not considered for inlining
11*4882a593Smuzhiyun  1232 | S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b)
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunUpstream-Status: Submitted [https://github.com/Perl/perl5/pull/19808]
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunSigned-off-by: Mingli Yu <mingli.yu@windriver.com>
16*4882a593Smuzhiyun---
17*4882a593Smuzhiyun proto.h | 42 ++++++++++++++----------------------------
18*4882a593Smuzhiyun 1 file changed, 14 insertions(+), 28 deletions(-)
19*4882a593Smuzhiyun
20*4882a593Smuzhiyundiff --git a/proto.h b/proto.h
21*4882a593Smuzhiyunindex faca6d1..3a76c04 100644
22*4882a593Smuzhiyun--- a/proto.h
23*4882a593Smuzhiyun+++ b/proto.h
24*4882a593Smuzhiyun@@ -5606,50 +5606,43 @@ STATIC SSize_t	S_unpack_rec(pTHX_ struct tempsym* symptr, const char *s, const c
25*4882a593Smuzhiyun #endif
26*4882a593Smuzhiyun #if defined(PERL_IN_PP_SORT_C)
27*4882a593Smuzhiyun #ifndef PERL_NO_INLINE_FUNCTIONS
28*4882a593Smuzhiyun-PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp(pTHX_ SV *const str1, SV *const str2)
29*4882a593Smuzhiyun-			__attribute__always_inline__;
30*4882a593Smuzhiyun+PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp(pTHX_ SV *const str1, SV *const str2);
31*4882a593Smuzhiyun #define PERL_ARGS_ASSERT_AMAGIC_CMP	\
32*4882a593Smuzhiyun 	assert(str1); assert(str2)
33*4882a593Smuzhiyun #endif
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun #ifndef PERL_NO_INLINE_FUNCTIONS
36*4882a593Smuzhiyun-PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_desc(pTHX_ SV *const str1, SV *const str2)
37*4882a593Smuzhiyun-			__attribute__always_inline__;
38*4882a593Smuzhiyun+PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_desc(pTHX_ SV *const str1, SV *const str2);
39*4882a593Smuzhiyun #define PERL_ARGS_ASSERT_AMAGIC_CMP_DESC	\
40*4882a593Smuzhiyun 	assert(str1); assert(str2)
41*4882a593Smuzhiyun #endif
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun #ifndef PERL_NO_INLINE_FUNCTIONS
44*4882a593Smuzhiyun-PERL_STATIC_FORCE_INLINE I32	S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b)
45*4882a593Smuzhiyun-			__attribute__always_inline__;
46*4882a593Smuzhiyun+PERL_STATIC_FORCE_INLINE I32	S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b);
47*4882a593Smuzhiyun #define PERL_ARGS_ASSERT_AMAGIC_I_NCMP	\
48*4882a593Smuzhiyun 	assert(a); assert(b)
49*4882a593Smuzhiyun #endif
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun #ifndef PERL_NO_INLINE_FUNCTIONS
52*4882a593Smuzhiyun-PERL_STATIC_FORCE_INLINE I32	S_amagic_i_ncmp_desc(pTHX_ SV *const a, SV *const b)
53*4882a593Smuzhiyun-			__attribute__always_inline__;
54*4882a593Smuzhiyun+PERL_STATIC_FORCE_INLINE I32	S_amagic_i_ncmp_desc(pTHX_ SV *const a, SV *const b);
55*4882a593Smuzhiyun #define PERL_ARGS_ASSERT_AMAGIC_I_NCMP_DESC	\
56*4882a593Smuzhiyun 	assert(a); assert(b)
57*4882a593Smuzhiyun #endif
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun #ifndef PERL_NO_INLINE_FUNCTIONS
60*4882a593Smuzhiyun-PERL_STATIC_FORCE_INLINE I32	S_amagic_ncmp(pTHX_ SV *const a, SV *const b)
61*4882a593Smuzhiyun-			__attribute__always_inline__;
62*4882a593Smuzhiyun+PERL_STATIC_FORCE_INLINE I32	S_amagic_ncmp(pTHX_ SV *const a, SV *const b);
63*4882a593Smuzhiyun #define PERL_ARGS_ASSERT_AMAGIC_NCMP	\
64*4882a593Smuzhiyun 	assert(a); assert(b)
65*4882a593Smuzhiyun #endif
66*4882a593Smuzhiyun
67*4882a593Smuzhiyun #ifndef PERL_NO_INLINE_FUNCTIONS
68*4882a593Smuzhiyun-PERL_STATIC_FORCE_INLINE I32	S_amagic_ncmp_desc(pTHX_ SV *const a, SV *const b)
69*4882a593Smuzhiyun-			__attribute__always_inline__;
70*4882a593Smuzhiyun+PERL_STATIC_FORCE_INLINE I32	S_amagic_ncmp_desc(pTHX_ SV *const a, SV *const b);
71*4882a593Smuzhiyun #define PERL_ARGS_ASSERT_AMAGIC_NCMP_DESC	\
72*4882a593Smuzhiyun 	assert(a); assert(b)
73*4882a593Smuzhiyun #endif
74*4882a593Smuzhiyun
75*4882a593Smuzhiyun #ifndef PERL_NO_INLINE_FUNCTIONS
76*4882a593Smuzhiyun-PERL_STATIC_FORCE_INLINE I32	S_cmp_desc(pTHX_ SV *const str1, SV *const str2)
77*4882a593Smuzhiyun-			__attribute__always_inline__;
78*4882a593Smuzhiyun+PERL_STATIC_FORCE_INLINE I32	S_cmp_desc(pTHX_ SV *const str1, SV *const str2);
79*4882a593Smuzhiyun #define PERL_ARGS_ASSERT_CMP_DESC	\
80*4882a593Smuzhiyun 	assert(str1); assert(str2)
81*4882a593Smuzhiyun #endif
82*4882a593Smuzhiyun@@ -5671,51 +5664,44 @@ PERL_STATIC_FORCE_INLINE void	S_sortsv_flags_impl(pTHX_ SV** array, size_t num_e
83*4882a593Smuzhiyun #endif
84*4882a593Smuzhiyun
85*4882a593Smuzhiyun #ifndef PERL_NO_INLINE_FUNCTIONS
86*4882a593Smuzhiyun-PERL_STATIC_FORCE_INLINE I32	S_sv_i_ncmp(pTHX_ SV *const a, SV *const b)
87*4882a593Smuzhiyun-			__attribute__always_inline__;
88*4882a593Smuzhiyun+PERL_STATIC_FORCE_INLINE I32	S_sv_i_ncmp(pTHX_ SV *const a, SV *const b);
89*4882a593Smuzhiyun #define PERL_ARGS_ASSERT_SV_I_NCMP	\
90*4882a593Smuzhiyun 	assert(a); assert(b)
91*4882a593Smuzhiyun #endif
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun #ifndef PERL_NO_INLINE_FUNCTIONS
94*4882a593Smuzhiyun-PERL_STATIC_FORCE_INLINE I32	S_sv_i_ncmp_desc(pTHX_ SV *const a, SV *const b)
95*4882a593Smuzhiyun-			__attribute__always_inline__;
96*4882a593Smuzhiyun+PERL_STATIC_FORCE_INLINE I32	S_sv_i_ncmp_desc(pTHX_ SV *const a, SV *const b);
97*4882a593Smuzhiyun #define PERL_ARGS_ASSERT_SV_I_NCMP_DESC	\
98*4882a593Smuzhiyun 	assert(a); assert(b)
99*4882a593Smuzhiyun #endif
100*4882a593Smuzhiyun
101*4882a593Smuzhiyun #ifndef PERL_NO_INLINE_FUNCTIONS
102*4882a593Smuzhiyun-PERL_STATIC_FORCE_INLINE I32	S_sv_ncmp(pTHX_ SV *const a, SV *const b)
103*4882a593Smuzhiyun-			__attribute__always_inline__;
104*4882a593Smuzhiyun+PERL_STATIC_FORCE_INLINE I32	S_sv_ncmp(pTHX_ SV *const a, SV *const b);
105*4882a593Smuzhiyun #define PERL_ARGS_ASSERT_SV_NCMP	\
106*4882a593Smuzhiyun 	assert(a); assert(b)
107*4882a593Smuzhiyun #endif
108*4882a593Smuzhiyun
109*4882a593Smuzhiyun #ifndef PERL_NO_INLINE_FUNCTIONS
110*4882a593Smuzhiyun-PERL_STATIC_FORCE_INLINE I32	S_sv_ncmp_desc(pTHX_ SV *const a, SV *const b)
111*4882a593Smuzhiyun-			__attribute__always_inline__;
112*4882a593Smuzhiyun+PERL_STATIC_FORCE_INLINE I32	S_sv_ncmp_desc(pTHX_ SV *const a, SV *const b);
113*4882a593Smuzhiyun #define PERL_ARGS_ASSERT_SV_NCMP_DESC	\
114*4882a593Smuzhiyun 	assert(a); assert(b)
115*4882a593Smuzhiyun #endif
116*4882a593Smuzhiyun
117*4882a593Smuzhiyun #  if defined(USE_LOCALE_COLLATE)
118*4882a593Smuzhiyun #ifndef PERL_NO_INLINE_FUNCTIONS
119*4882a593Smuzhiyun-PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_locale(pTHX_ SV *const str1, SV *const str2)
120*4882a593Smuzhiyun-			__attribute__always_inline__;
121*4882a593Smuzhiyun+PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_locale(pTHX_ SV *const str1, SV *const str2);
122*4882a593Smuzhiyun #define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE	\
123*4882a593Smuzhiyun 	assert(str1); assert(str2)
124*4882a593Smuzhiyun #endif
125*4882a593Smuzhiyun
126*4882a593Smuzhiyun #ifndef PERL_NO_INLINE_FUNCTIONS
127*4882a593Smuzhiyun-PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2)
128*4882a593Smuzhiyun-			__attribute__always_inline__;
129*4882a593Smuzhiyun+PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2);
130*4882a593Smuzhiyun #define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE_DESC	\
131*4882a593Smuzhiyun 	assert(str1); assert(str2)
132*4882a593Smuzhiyun #endif
133*4882a593Smuzhiyun
134*4882a593Smuzhiyun #ifndef PERL_NO_INLINE_FUNCTIONS
135*4882a593Smuzhiyun-PERL_STATIC_FORCE_INLINE I32	S_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2)
136*4882a593Smuzhiyun-			__attribute__always_inline__;
137*4882a593Smuzhiyun+PERL_STATIC_FORCE_INLINE I32	S_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2);
138*4882a593Smuzhiyun #define PERL_ARGS_ASSERT_CMP_LOCALE_DESC	\
139*4882a593Smuzhiyun 	assert(str1); assert(str2)
140*4882a593Smuzhiyun #endif
141*4882a593Smuzhiyun--
142*4882a593Smuzhiyun2.25.1
143*4882a593Smuzhiyun
144