All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perl: Fix build with gcc-12
@ 2022-06-02  5:46 mingli.yu
  2022-06-02 16:14 ` [OE-core] " Richard Purdie
       [not found] ` <16F4D9D44BEAC048.30120@lists.openembedded.org>
  0 siblings, 2 replies; 3+ messages in thread
From: mingli.yu @ 2022-06-02  5:46 UTC (permalink / raw)
  To: openembedded-core

From: Mingli Yu <mingli.yu@windriver.com>

Fix the build failure when debug build is enabled.
Add DEBUG_BUILD = "1" in conf/local.conf.
 $ bitbake perl
  | In function 'dynprep',
    inlined from 'S_sortsv_flags_impl' at pp_sort.c:358:20,
    inlined from 'sortsv_amagic_i_ncmp' at pp_sort.c:572:5:
  |  pp_sort.c:1232:1: error: inlining failed in call to 'always_inline' 'S_amagic_i_ncmp': function not considered for inlining
  | 1232 | S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b)

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 .../files/0001-Fix-build-with-gcc-12.patch    | 143 ++++++++++++++++++
 meta/recipes-devtools/perl/perl_5.34.1.bb     |   1 +
 2 files changed, 144 insertions(+)
 create mode 100644 meta/recipes-devtools/perl/files/0001-Fix-build-with-gcc-12.patch

diff --git a/meta/recipes-devtools/perl/files/0001-Fix-build-with-gcc-12.patch b/meta/recipes-devtools/perl/files/0001-Fix-build-with-gcc-12.patch
new file mode 100644
index 0000000000..1d98e1389b
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/0001-Fix-build-with-gcc-12.patch
@@ -0,0 +1,143 @@
+From ee957eb9e4ec29a462cdbb2f3bbe29d4270534ef Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Thu, 2 Jun 2022 13:01:37 +0800
+Subject: [PATCH] proto.h: Fix build with gcc-12
+
+Fixes:
+  In function 'dynprep',
+    inlined from 'S_sortsv_flags_impl' at pp_sort.c:358:20,
+    inlined from 'sortsv_amagic_i_ncmp' at pp_sort.c:572:5:
+    pp_sort.c:1232:1: error: inlining failed in call to 'always_inline' 'S_amagic_i_ncmp': function not considered for inlining
+  1232 | S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b)
+
+Upstream-Status: Submitted [https://github.com/Perl/perl5/pull/19808]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ proto.h | 42 ++++++++++++++----------------------------
+ 1 file changed, 14 insertions(+), 28 deletions(-)
+
+diff --git a/proto.h b/proto.h
+index faca6d1..3a76c04 100644
+--- a/proto.h
++++ b/proto.h
+@@ -5606,50 +5606,43 @@ STATIC SSize_t	S_unpack_rec(pTHX_ struct tempsym* symptr, const char *s, const c
+ #endif
+ #if defined(PERL_IN_PP_SORT_C)
+ #ifndef PERL_NO_INLINE_FUNCTIONS
+-PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp(pTHX_ SV *const str1, SV *const str2)
+-			__attribute__always_inline__;
++PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp(pTHX_ SV *const str1, SV *const str2);
+ #define PERL_ARGS_ASSERT_AMAGIC_CMP	\
+ 	assert(str1); assert(str2)
+ #endif
+ 
+ #ifndef PERL_NO_INLINE_FUNCTIONS
+-PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_desc(pTHX_ SV *const str1, SV *const str2)
+-			__attribute__always_inline__;
++PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_desc(pTHX_ SV *const str1, SV *const str2);
+ #define PERL_ARGS_ASSERT_AMAGIC_CMP_DESC	\
+ 	assert(str1); assert(str2)
+ #endif
+ 
+ #ifndef PERL_NO_INLINE_FUNCTIONS
+-PERL_STATIC_FORCE_INLINE I32	S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b)
+-			__attribute__always_inline__;
++PERL_STATIC_FORCE_INLINE I32	S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b);
+ #define PERL_ARGS_ASSERT_AMAGIC_I_NCMP	\
+ 	assert(a); assert(b)
+ #endif
+ 
+ #ifndef PERL_NO_INLINE_FUNCTIONS
+-PERL_STATIC_FORCE_INLINE I32	S_amagic_i_ncmp_desc(pTHX_ SV *const a, SV *const b)
+-			__attribute__always_inline__;
++PERL_STATIC_FORCE_INLINE I32	S_amagic_i_ncmp_desc(pTHX_ SV *const a, SV *const b);
+ #define PERL_ARGS_ASSERT_AMAGIC_I_NCMP_DESC	\
+ 	assert(a); assert(b)
+ #endif
+ 
+ #ifndef PERL_NO_INLINE_FUNCTIONS
+-PERL_STATIC_FORCE_INLINE I32	S_amagic_ncmp(pTHX_ SV *const a, SV *const b)
+-			__attribute__always_inline__;
++PERL_STATIC_FORCE_INLINE I32	S_amagic_ncmp(pTHX_ SV *const a, SV *const b);
+ #define PERL_ARGS_ASSERT_AMAGIC_NCMP	\
+ 	assert(a); assert(b)
+ #endif
+ 
+ #ifndef PERL_NO_INLINE_FUNCTIONS
+-PERL_STATIC_FORCE_INLINE I32	S_amagic_ncmp_desc(pTHX_ SV *const a, SV *const b)
+-			__attribute__always_inline__;
++PERL_STATIC_FORCE_INLINE I32	S_amagic_ncmp_desc(pTHX_ SV *const a, SV *const b);
+ #define PERL_ARGS_ASSERT_AMAGIC_NCMP_DESC	\
+ 	assert(a); assert(b)
+ #endif
+ 
+ #ifndef PERL_NO_INLINE_FUNCTIONS
+-PERL_STATIC_FORCE_INLINE I32	S_cmp_desc(pTHX_ SV *const str1, SV *const str2)
+-			__attribute__always_inline__;
++PERL_STATIC_FORCE_INLINE I32	S_cmp_desc(pTHX_ SV *const str1, SV *const str2);
+ #define PERL_ARGS_ASSERT_CMP_DESC	\
+ 	assert(str1); assert(str2)
+ #endif
+@@ -5671,51 +5664,44 @@ PERL_STATIC_FORCE_INLINE void	S_sortsv_flags_impl(pTHX_ SV** array, size_t num_e
+ #endif
+ 
+ #ifndef PERL_NO_INLINE_FUNCTIONS
+-PERL_STATIC_FORCE_INLINE I32	S_sv_i_ncmp(pTHX_ SV *const a, SV *const b)
+-			__attribute__always_inline__;
++PERL_STATIC_FORCE_INLINE I32	S_sv_i_ncmp(pTHX_ SV *const a, SV *const b);
+ #define PERL_ARGS_ASSERT_SV_I_NCMP	\
+ 	assert(a); assert(b)
+ #endif
+ 
+ #ifndef PERL_NO_INLINE_FUNCTIONS
+-PERL_STATIC_FORCE_INLINE I32	S_sv_i_ncmp_desc(pTHX_ SV *const a, SV *const b)
+-			__attribute__always_inline__;
++PERL_STATIC_FORCE_INLINE I32	S_sv_i_ncmp_desc(pTHX_ SV *const a, SV *const b);
+ #define PERL_ARGS_ASSERT_SV_I_NCMP_DESC	\
+ 	assert(a); assert(b)
+ #endif
+ 
+ #ifndef PERL_NO_INLINE_FUNCTIONS
+-PERL_STATIC_FORCE_INLINE I32	S_sv_ncmp(pTHX_ SV *const a, SV *const b)
+-			__attribute__always_inline__;
++PERL_STATIC_FORCE_INLINE I32	S_sv_ncmp(pTHX_ SV *const a, SV *const b);
+ #define PERL_ARGS_ASSERT_SV_NCMP	\
+ 	assert(a); assert(b)
+ #endif
+ 
+ #ifndef PERL_NO_INLINE_FUNCTIONS
+-PERL_STATIC_FORCE_INLINE I32	S_sv_ncmp_desc(pTHX_ SV *const a, SV *const b)
+-			__attribute__always_inline__;
++PERL_STATIC_FORCE_INLINE I32	S_sv_ncmp_desc(pTHX_ SV *const a, SV *const b);
+ #define PERL_ARGS_ASSERT_SV_NCMP_DESC	\
+ 	assert(a); assert(b)
+ #endif
+ 
+ #  if defined(USE_LOCALE_COLLATE)
+ #ifndef PERL_NO_INLINE_FUNCTIONS
+-PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_locale(pTHX_ SV *const str1, SV *const str2)
+-			__attribute__always_inline__;
++PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_locale(pTHX_ SV *const str1, SV *const str2);
+ #define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE	\
+ 	assert(str1); assert(str2)
+ #endif
+ 
+ #ifndef PERL_NO_INLINE_FUNCTIONS
+-PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2)
+-			__attribute__always_inline__;
++PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2);
+ #define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE_DESC	\
+ 	assert(str1); assert(str2)
+ #endif
+ 
+ #ifndef PERL_NO_INLINE_FUNCTIONS
+-PERL_STATIC_FORCE_INLINE I32	S_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2)
+-			__attribute__always_inline__;
++PERL_STATIC_FORCE_INLINE I32	S_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2);
+ #define PERL_ARGS_ASSERT_CMP_LOCALE_DESC	\
+ 	assert(str1); assert(str2)
+ #endif
+-- 
+2.25.1
+
diff --git a/meta/recipes-devtools/perl/perl_5.34.1.bb b/meta/recipes-devtools/perl/perl_5.34.1.bb
index 0e9d0c032e..4b9d2e2c50 100644
--- a/meta/recipes-devtools/perl/perl_5.34.1.bb
+++ b/meta/recipes-devtools/perl/perl_5.34.1.bb
@@ -17,6 +17,7 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
            file://0002-Constant-Fix-up-shebang.patch \
            file://determinism.patch \
            file://0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch \
+           file://0001-Fix-build-with-gcc-12.patch \
            "
 SRC_URI:append:class-native = " \
            file://perl-configpm-switch.patch \
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [OE-core] [PATCH] perl: Fix build with gcc-12
  2022-06-02  5:46 [PATCH] perl: Fix build with gcc-12 mingli.yu
@ 2022-06-02 16:14 ` Richard Purdie
       [not found] ` <16F4D9D44BEAC048.30120@lists.openembedded.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2022-06-02 16:14 UTC (permalink / raw)
  To: Yu, Mingli, openembedded-core

On Thu, 2022-06-02 at 13:46 +0800, Yu, Mingli wrote:
> From: Mingli Yu <mingli.yu@windriver.com>
> 
> Fix the build failure when debug build is enabled.
> Add DEBUG_BUILD = "1" in conf/local.conf.
>  $ bitbake perl
>   | In function 'dynprep',
>     inlined from 'S_sortsv_flags_impl' at pp_sort.c:358:20,
>     inlined from 'sortsv_amagic_i_ncmp' at pp_sort.c:572:5:
>   |  pp_sort.c:1232:1: error: inlining failed in call to 'always_inline' 'S_amagic_i_ncmp': function not considered for inlining
>   | 1232 | S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b)
> 
> Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> ---
>  .../files/0001-Fix-build-with-gcc-12.patch    | 143 ++++++++++++++++++
>  meta/recipes-devtools/perl/perl_5.34.1.bb     |   1 +
>  2 files changed, 144 insertions(+)
>  create mode 100644 meta/recipes-devtools/perl/files/0001-Fix-build-with-gcc-12.patch

Dropping this as is seems to break things:

https://autobuilder.yoctoproject.org/typhoon/#/builders/37/builds/5315/steps/11/logs/stdio

Cheers,

Richard


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OE-core] [PATCH] perl: Fix build with gcc-12
       [not found] ` <16F4D9D44BEAC048.30120@lists.openembedded.org>
@ 2022-06-02 16:16   ` Richard Purdie
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2022-06-02 16:16 UTC (permalink / raw)
  To: Yu, Mingli, openembedded-core

On Thu, 2022-06-02 at 17:14 +0100, Richard Purdie via
lists.openembedded.org wrote:
> On Thu, 2022-06-02 at 13:46 +0800, Yu, Mingli wrote:
> > From: Mingli Yu <mingli.yu@windriver.com>
> > 
> > Fix the build failure when debug build is enabled.
> > Add DEBUG_BUILD = "1" in conf/local.conf.
> >  $ bitbake perl
> >   | In function 'dynprep',
> >     inlined from 'S_sortsv_flags_impl' at pp_sort.c:358:20,
> >     inlined from 'sortsv_amagic_i_ncmp' at pp_sort.c:572:5:
> >   |  pp_sort.c:1232:1: error: inlining failed in call to 'always_inline' 'S_amagic_i_ncmp': function not considered for inlining
> >   | 1232 | S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b)
> > 
> > Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> > ---
> >  .../files/0001-Fix-build-with-gcc-12.patch    | 143 ++++++++++++++++++
> >  meta/recipes-devtools/perl/perl_5.34.1.bb     |   1 +
> >  2 files changed, 144 insertions(+)
> >  create mode 100644 meta/recipes-devtools/perl/files/0001-Fix-build-with-gcc-12.patch
> 
> Dropping this as is seems to break things:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/37/builds/5315/steps/11/logs/stdio

Looking further this may be a repeat of:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=14096

but nobody seems able to work that one out :(

Cheers,

Richard



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-02 16:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-02  5:46 [PATCH] perl: Fix build with gcc-12 mingli.yu
2022-06-02 16:14 ` [OE-core] " Richard Purdie
     [not found] ` <16F4D9D44BEAC048.30120@lists.openembedded.org>
2022-06-02 16:16   ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.