[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-devel
Subject: Re: [oe] [meta-oe][PATCH] librelp: fix function inline errors in debug build
From: "Shinde, Yash" <Yash.Shinde () windriver ! com>
Date: 2023-03-30 4:10:05
Message-ID: SJ1PR11MB61296D638CFEA89A753C29ABEB8E9 () SJ1PR11MB6129 ! namprd11 ! prod ! outlook ! com
[Download RAW message or body]
On 2023-03-29 19:06, Randy MacLeod wrote:
First, if we're going to take this approach, you should revert my work-around as part \
of this commit:
commit ca10312c4c7e88d67f4b487ae9afcbfdf92898d6
Author: Randy MacLeod <Randy.MacLeod@...><mailto:Randy.MacLeod@...>
Date: Wed Mar 1 19:24:27 2023
librelp: make inline errors be warnings in debug build
...
>Will send a v2 if needed.
BUT...
The problem isn't so much that the code doesn't get in-lined when doing a debug build \
but that it fails to compile. I think this is a compiler regressions since
I was not able to reproduce the error when compiling natively using Ubuntu-22.04 \
(gcc-11.3) but was able to reproduce it using Fedora-37, gcc --version : gcc (GCC) \
12.2.1 20221121 (Red Hat 12.2.1-4)
Does the change you made actually build with the two compiler versions above?
> I tested the changes in LINCD sources which have GCC 12.2. I didn’t check the above \
> mentioned version.
Is there documentation that states that
static inline void
is not as portable as:
__attribute__((always_inline)) static inline void
I suspect there is not but I'm not a compiler geek!
> As you mentioned in \
> https://github.com/rsyslog/librelp/issues/256#issue-1605905115<https://github.com/rs \
> yslog/librelp/issues/256#:~:text=Oh%20and%20it%20only%20happens%20when%20using%20%2DOg%20not%20%2DO%5B0%2D3%5D>, \
> it happens only when complied without any optimization and as per \
> https://gcc.gnu.org/onlinedocs/gcc/Inline.html<https://gcc.gnu.org/onlinedocs/gcc/In \
> line.html#:~:text=GCC%20does%20not%20inline%20any%20functions%20when%20not%20optimiz \
> ing%20unless%20you%20specify%20the%20%E2%80%98always_inline%E2%80%99%20attribute%20for%20the%20function%2C%20like%20this%3A> \
> it’s mentioned that:
GCC does not inline any functions when not optimizing unless you specify the \
‘always_inline’ attribute for the function, like this: /* Prototype. */ inline void \
foo (const char) __attribute__((always_inline));
Please let me know if we are on the same page.
../Randy
Regards,
Yash
From: MacLeod, Randy<mailto:Randy.MacLeod@windriver.com>
Sent: 29 March 2023 19:06
To: Yash Shinde<mailto:yashinde145@gmail.com>; \
openembedded-devel@lists.openembedded.org<mailto:openembedded-devel@lists.openembedded.org>
Cc: Kallapa, Umesh<mailto:Umesh.Kallapa@windriver.com>; Gowda, \
Naveen<mailto:Naveen.Gowda@windriver.com>; Kokkonda, \
Sundeep<mailto:Sundeep.Kokkonda@windriver.com>; Moodalappa, \
Shivaprasad<mailto:Shivaprasad.Moodalappa@windriver.com>; Shinde, \
Yash<mailto:Yash.Shinde@windriver.com>
Subject: Re: [meta-oe][PATCH] librelp: fix function inline errors in debug build
On 2023-03-29 03:58, Yash Shinde wrote:
With DEBUG_BUILD = "1", the following errors occur:
src/relpsess.c:95:1: error:
inlining failed in call to 'relpSessFreePermittedPeers': function not \
considered for inlining [-Werror=inline]
src/tcp.c:146:1: error:
inlining failed in call to 'relpTcpFreePermittedPeers': function not considered \
for inlining [-Werror=inline]
src/tcp.c:158:1: error:
inlining failed in call to 'callOnAuthErr': function not considered for \
inlining [-Werror=inline]
Compiler does not inline any functions when not optimizing unless you specify the \
‘always_inline’ attribute for the function. Add "__attribute__((always_inline))" to \
avoid these function inline errors.
Hi Yash,
First, if we're going to take this approach, you should revert my work-around as part \
of this commit:
commit ca10312c4c7e88d67f4b487ae9afcbfdf92898d6
Author: Randy MacLeod \
<Randy.MacLeod@windriver.com><mailto:Randy.MacLeod@windriver.com>
Date: Wed Mar 1 19:24:27 2023
librelp: make inline errors be warnings in debug build
...
BUT...
The problem isn't so much that the code doesn't get in-lined when doing a debug build \
but that it fails to compile. I think this is a compiler regressions since
I was not able to reproduce the error when compiling natively using Ubuntu-22.04 \
(gcc-11.3) but was able to reproduce it using Fedora-37, gcc --version : gcc (GCC) \
12.2.1 20221121 (Red Hat 12.2.1-4)
Does the change you made actually build with the two compiler versions above?
Is there documentation that states that
static inline void
is not as portable as:
__attribute__((always_inline)) static inline void
I suspect there is not but I'm not a compiler geek!
../Randy
Upstream-Status: Tracked by upstream bug: \
https://github.com/rsyslog/librelp/issues/256
Signed-off-by: Yash Shinde \
<Yash.Shinde@windriver.com><mailto:Yash.Shinde@windriver.com>
---
...02-librelp-fix-function-inline-error.patch | 59 +++++++++++++++++++
1 file changed, 59 insertions(+)
create mode 100644 meta-oe/recipes-extended/rsyslog/rsyslog/0002-librelp-fix-function-inline-error.patch
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/0002-librelp-fix-function-inline-error.patch \
b/meta-oe/recipes-extended/rsyslog/rsyslog/0002-librelp-fix-function-inline-error.patch
new file mode 100644
index 000000000..60cf1b632
--- /dev/null
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog/0002-librelp-fix-function-inline-error.patch
@@ -0,0 +1,59 @@
+From dc841f01fb6167ec9a80e373c5f4d2f5e3222ed6 Mon Sep 17 00:00:00 2001
+From: Yash Shinde <Yash.Shinde@windriver.com><mailto:Yash.Shinde@windriver.com>
+Date: Tue, 28 Mar 2023 04:06:58 +0000
+Subject: librelp: fix function inline errors in debug build
+
+With DEBUG_BUILD = "1", the following errors occur:
+
+ src/relpsess.c:95:1: error:
+ inlining failed in call to 'relpSessFreePermittedPeers': function not \
considered for inlining [-Werror=inline]
+
+ src/tcp.c:146:1: error:
+ inlining failed in call to 'relpTcpFreePermittedPeers': function not \
considered for inlining [-Werror=inline]
+
+ src/tcp.c:158:1: error:
+ inlining failed in call to 'callOnAuthErr': function not considered for \
inlining [-Werror=inline]
+
+Compiler does not inline any functions when not optimizing unless you specify the \
‘always_inline’ attribute for the function. Add "__attribute__((always_inline))" to \
avoid these function inline errors.
+
+Upstream-Status: Tracked by upstream bug: \
https://github.com/rsyslog/librelp/issues/256
+
+Signed-off-by: Yash Shinde \
<Yash.Shinde@windriver.com><mailto:Yash.Shinde@windriver.com>
+---
+
+diff --git a/src/relpsess.c b/src/relpsess.c
+index ee7b595..aa52b71 100644
+--- a/src/relpsess.c
++++ b/src/relpsess.c
+@@ -91,7 +91,7 @@ callOnErr(const relpSess_t *__restrict__ const pThis,
+
+
+ /* helper to free permittedPeer structure */
+-static inline void
++__attribute__((always_inline)) static inline void
+ relpSessFreePermittedPeers(relpSess_t *const pThis)
+ {
+ int i;
+diff --git a/src/tcp.c b/src/tcp.c
+index 7a75cc4..f4088c0 100644
+--- a/src/tcp.c
++++ b/src/tcp.c
+@@ -142,7 +142,7 @@ static int relpTcpChkPeerName(relpTcp_t *const pThis, void* \
cert);
+
+
+ /* helper to free permittedPeer structure */
+-static inline void
++__attribute__((always_inline)) static inline void
+ relpTcpFreePermittedPeers(relpTcp_t *const pThis)
+ {
+ int i;
+@@ -154,7 +154,7 @@ relpTcpFreePermittedPeers(relpTcp_t *const pThis)
+ }
+
+ /* helper to call onAuthErr if set */
+-static inline void
++__attribute__((always_inline)) static inline void
+ callOnAuthErr(relpTcp_t *const pThis, const char *authdata, const char *emsg, \
relpRetVal ecode)
+ {
+ pThis->pEngine->dbgprint((char*)"librelp: auth error: authdata:'%s', ecode \
%d, "
+
--
# Randy MacLeod
# Wind River Linux
[Attachment #3 (text/html)]
<html xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 5 4 2 2 2 2 2 4;}
@font-face
{font-family:Mangal;
panose-1:2 4 5 3 5 2 3 3 2 2;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-IN" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">On 2023-03-29 19:06, Randy <span \
style="font-size:10.5pt;font-family:"Helvetica",sans-serif;color:#333333"> \
MacLeod </span>wrote:<o:p></o:p></p> <div>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:7.5pt;margin-left:0cm;background:white">
<span style="color:black"><br>
</span><span style="font-size:10.5pt;font-family:"Helvetica",sans-serif;color:#333333">First, \
if we're going to take this approach, you should revert my work-around as part of \
this commit:<o:p></o:p></span></p> <p \
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:7.5pt;margin-left:0cm;background:white;box-sizing: \
border-box;font-variant-ligatures: normal;font-variant-caps: normal;orphans: \
2;text-align:start;widows: 2;-webkit-text-stroke-width: \
0px;text-decoration-thickness: initial;text-decoration-style: \
initial;text-decoration-color: initial;word-spacing:0px"> <span \
style="font-size:10.5pt;font-family:"Helvetica",sans-serif;color:#333333">commit \
ca10312c4c7e88d67f4b487ae9afcbfdf92898d6<br> Author: Randy \
MacLeod <a href="mailto:Randy.MacLeod@..." target="_blank"><span \
style="color:#337AB7"><Randy.MacLeod@...></span></a><br>
Date: Wed Mar 1 19:24:27 2023<br>
<br>
librelp: make inline errors be warnings in debug build<br>
...<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:7.5pt;margin-left:0cm;background:white;box-sizing: \
border-box;font-variant-ligatures: normal;font-variant-caps: normal;orphans: \
2;text-align:start;widows: 2;-webkit-text-stroke-width: \
0px;text-decoration-thickness: initial;text-decoration-style: \
initial;text-decoration-color: initial;word-spacing:0px"> <span \
style="font-size:10.5pt;font-family:"Helvetica",sans-serif;color:#333333"> \
>Will send a v2 if needed.<o:p></o:p></span></p> <p \
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:7.5pt;margin-left:0cm;background:white;box-sizing: \
border-box;font-variant-ligatures: normal;font-variant-caps: normal;orphans: \
2;text-align:start;widows: 2;-webkit-text-stroke-width: \
0px;text-decoration-thickness: initial;text-decoration-style: \
initial;text-decoration-color: initial;word-spacing:0px"> <span \
style="font-size:10.5pt;font-family:"Helvetica",sans-serif;color:#333333">BUT...<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:7.5pt;margin-left:0cm;background:white;box-sizing: \
border-box;font-variant-ligatures: normal;font-variant-caps: normal;orphans: \
2;text-align:start;widows: 2;-webkit-text-stroke-width: \
0px;text-decoration-thickness: initial;text-decoration-style: \
initial;text-decoration-color: initial;word-spacing:0px"> <span \
style="font-size:10.5pt;font-family:"Helvetica",sans-serif;color:#333333">The \
problem isn't so much that the code doesn't get in-lined when doing a debug build \
but<br> that it fails to compile. I think this is a compiler regressions \
since<br> I was <em><span \
style="font-family:"Helvetica",sans-serif">not</span></em> able to \
reproduce the error when compiling natively using Ubuntu-22.04 (gcc-11.3) but<br> \
<em><span style="font-family:"Helvetica",sans-serif">was</span></em> able \
to reproduce it using Fedora-37, gcc --version : gcc (GCC) 12.2.1 20221121 (Red Hat \
12.2.1-4)<o:p></o:p></span></p> <p \
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:7.5pt;margin-left:0cm;background:white;box-sizing: \
border-box;font-variant-ligatures: normal;font-variant-caps: normal;orphans: \
2;text-align:start;widows: 2;-webkit-text-stroke-width: \
0px;text-decoration-thickness: initial;text-decoration-style: \
initial;text-decoration-color: initial;word-spacing:0px"> <span \
style="font-size:10.5pt;font-family:"Helvetica",sans-serif;color:#333333"><o:p> </o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:7.5pt;margin-left:36.0pt;background:white;box-sizing: \
border-box;font-variant-ligatures: normal;font-variant-caps: normal;orphans: \
2;text-align:start;widows: 2;-webkit-text-stroke-width: \
0px;text-decoration-thickness: initial;text-decoration-style: \
initial;text-decoration-color: initial;word-spacing:0px"> <span \
style="font-size:10.5pt;font-family:"Helvetica",sans-serif;color:#333333">Does \
the change you made actually build with the two compiler versions above?<br> >I \
tested the changes in LINCD sources which have GCC 12.2. I didn’t check the above \
mentioned version.<br> <br>
Is there documentation that states that<o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:solid #CCCCCC 1.0pt;padding:7.0pt \
7.0pt 7.0pt 7.0pt;background:whitesmoke"> <pre \
style="margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm;box-sizing: \
border-box;overflow-wrap: break-word;border-radius: 4px;font-variant-ligatures: \
normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: \
2;-webkit-text-stroke-width: 0px;text-decoration-thickness: \
initial;text-decoration-style: initial;text-decoration-color: \
initial;overflow:auto;word-spacing:0px"><span \
style="font-family:Consolas;color:#333333">static inline void<o:p></o:p></span></pre> \
<pre style="margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm"><span \
style="font-family:Consolas;color:#333333"><o:p> </o:p></span></pre> <pre \
style="margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm"><span \
style="font-family:Consolas;color:#333333">is not as portable \
as:<o:p></o:p></span></pre> <pre \
style="margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm"><span \
style="font-family:Consolas;color:#333333"><o:p> </o:p></span></pre> <pre \
style="margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm"><span \
style="font-family:Consolas;color:#333333">__attribute__((always_inline)) static \
inline void<o:p></o:p></span></pre> </div>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:7.5pt;margin-left:0cm;background:white;box-sizing: \
border-box;font-variant-ligatures: normal;font-variant-caps: normal;orphans: \
2;text-align:start;widows: 2;-webkit-text-stroke-width: \
0px;text-decoration-thickness: initial;text-decoration-style: \
initial;text-decoration-color: initial;word-spacing:0px"> <span \
style="font-size:10.5pt;font-family:"Helvetica",sans-serif;color:#333333">I \
suspect there is not but I'm not a compiler geek!<br> <br>
>As you mentioned in <a \
href="https://github.com/rsyslog/librelp/issues/256#:~:text=Oh%20and%20it%20only%20happens%20when%20using%20%2DOg%20not%20%2DO%5B0%2D3%5D">
https://github.com/rsyslog/librelp/issues/256#issue-1605905115</a>, it happens only \
when complied without any optimization and as per <a \
href="https://gcc.gnu.org/onlinedocs/gcc/Inline.html#:~:text=GCC%20does%20not%20inline \
%20any%20functions%20when%20not%20optimizing%20unless%20you%20specify%20the%20%E2%80%98always_inline%E2%80%99%20attribute%20for%20the%20function%2C%20like%20this%3A">
https://gcc.gnu.org/onlinedocs/gcc/Inline.html</a> it’s mentioned that:<br>
<br>
GCC does not inline any functions when not optimizing unless you specify the \
‘always_inline’ attribute for the function, like this: <br>
/* Prototype. */ inline void foo (const char) __attribute__((always_inline)); \
<br> <br>
Please let me know if we are on the same page.<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:7.5pt;margin-left:0cm;background:white;box-sizing: \
border-box;font-variant-ligatures: normal;font-variant-caps: normal;orphans: \
2;text-align:start;widows: 2;-webkit-text-stroke-width: \
0px;text-decoration-thickness: initial;text-decoration-style: \
initial;text-decoration-color: initial;word-spacing:0px"> <span \
style="font-size:10.5pt;font-family:"Helvetica",sans-serif;color:#333333">../Randy<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<br>
Yash<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 \
1.0pt;padding:3.0pt 0cm 0cm 0cm"> <p class="MsoNormal" \
style="border:none;padding:0cm"><b>From: </b><a \
href="mailto:Randy.MacLeod@windriver.com">MacLeod, Randy</a><br> <b>Sent: </b>29 \
March 2023 19:06<br> <b>To: </b><a href="mailto:yashinde145@gmail.com">Yash \
Shinde</a>; <a href="mailto:openembedded-devel@lists.openembedded.org"> \
openembedded-devel@lists.openembedded.org</a><br> <b>Cc: </b><a \
href="mailto:Umesh.Kallapa@windriver.com">Kallapa, Umesh</a>; <a \
href="mailto:Naveen.Gowda@windriver.com"> Gowda, Naveen</a>; <a \
href="mailto:Sundeep.Kokkonda@windriver.com">Kokkonda, Sundeep</a>; <a \
href="mailto:Shivaprasad.Moodalappa@windriver.com">Moodalappa, Shivaprasad</a>; <a \
href="mailto:Yash.Shinde@windriver.com">Shinde, Yash</a><br> <b>Subject: </b>Re: \
[meta-oe][PATCH] librelp: fix function inline errors in debug build</p> </div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 2023-03-29 03:58, Yash Shinde wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre>With DEBUG_BUILD = "1", the following errors occur:</pre>
<pre><o:p> </o:p></pre>
<pre> src/relpsess.c:95:1: error:</pre>
<pre> inlining failed in call to \
'relpSessFreePermittedPeers': function not considered for inlining \
[-Werror=inline]</pre> <pre><o:p> </o:p></pre>
<pre> src/tcp.c:146:1: error:</pre>
<pre> inlining failed in call to \
'relpTcpFreePermittedPeers': function not considered for inlining \
[-Werror=inline]</pre> <pre><o:p> </o:p></pre>
<pre> src/tcp.c:158:1: error:</pre>
<pre> inlining failed in call to 'callOnAuthErr': \
function not considered for inlining [-Werror=inline]</pre> \
<pre><o:p> </o:p></pre> <pre>Compiler does not inline any functions when not \
optimizing unless you specify the ‘always_inline’ attribute for the function. Add \
"__attribute__((always_inline))" to avoid these function inline \
errors.</pre> </blockquote>
<p>Hi Yash,</p>
<p><o:p> </o:p></p>
<p>First, if we're going to take this approach, you should revert my work-around as \
part of this commit:</p> <p>commit ca10312c4c7e88d67f4b487ae9afcbfdf92898d6<br>
Author: Randy MacLeod <a \
href="mailto:Randy.MacLeod@windriver.com"><Randy.MacLeod@windriver.com></a><br>
Date: Wed Mar 1 19:24:27 2023<br>
<br>
librelp: make inline errors be warnings in debug build<br>
...</p>
<p><o:p> </o:p></p>
<p>BUT...</p>
<p>The problem isn't so much that the code doesn't get in-lined when doing a debug \
build but<br> that it fails to compile. I think this is a compiler regressions \
since <br> I was <em><span \
style="font-family:"Calibri",sans-serif">not</span></em> able to reproduce \
the error when compiling natively using Ubuntu-22.04 (gcc-11.3) but<br> <em><span \
style="font-family:"Calibri",sans-serif">was</span></em> able to reproduce \
it using Fedora-37, gcc --version : gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)</p> \
<p><o:p> </o:p></p> <p>Does the change you made actually build with the two \
compiler versions above?<br> Is there documentation that states that <o:p></o:p></p>
<pre>static inline void</pre>
<pre><o:p> </o:p></pre>
<pre>is not as portable as:</pre>
<pre><o:p> </o:p></pre>
<pre>__attribute__((always_inline)) static inline void</pre>
<p>I suspect there is not but I'm not a compiler geek!</p>
<p>../Randy</p>
<p><o:p> </o:p></p>
<p><o:p> </o:p></p>
<p><o:p> </o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Upstream-Status: Tracked by upstream bug: <a \
href="https://github.com/rsyslog/librelp/issues/256">https://github.com/rsyslog/librelp/issues/256</a></pre>
<pre><o:p> </o:p></pre>
<pre>Signed-off-by: Yash Shinde <a \
href="mailto:Yash.Shinde@windriver.com"><Yash.Shinde@windriver.com></a></pre> \
<pre>---</pre> <pre> ...02-librelp-fix-function-inline-error.patch | 59 \
+++++++++++++++++++</pre> <pre> 1 file changed, 59 insertions(+)</pre>
<pre> create mode 100644 \
meta-oe/recipes-extended/rsyslog/rsyslog/0002-librelp-fix-function-inline-error.patch</pre>
<pre><o:p> </o:p></pre>
<pre>diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/0002-librelp-fix-function-inline-error.patch \
b/meta-oe/recipes-extended/rsyslog/rsyslog/0002-librelp-fix-function-inline-error.patch</pre>
<pre>new file mode 100644</pre>
<pre>index 000000000..60cf1b632</pre>
<pre>--- /dev/null</pre>
<pre>+++ b/meta-oe/recipes-extended/rsyslog/rsyslog/0002-librelp-fix-function-inline-error.patch</pre>
<pre>@@ -0,0 +1,59 @@</pre>
<pre>+From dc841f01fb6167ec9a80e373c5f4d2f5e3222ed6 Mon Sep 17 00:00:00 2001</pre>
<pre>+From: Yash Shinde <a \
href="mailto:Yash.Shinde@windriver.com"><Yash.Shinde@windriver.com></a></pre> \
<pre>+Date: Tue, 28 Mar 2023 04:06:58 +0000</pre> <pre>+Subject: librelp: fix \
function inline errors in debug build</pre> <pre>+</pre>
<pre>+With DEBUG_BUILD = "1", the following errors occur:</pre>
<pre>+</pre>
<pre>+ src/relpsess.c:95:1: error:</pre>
<pre>+ inlining failed in call to \
'relpSessFreePermittedPeers': function not considered for inlining \
[-Werror=inline]</pre> <pre>+</pre>
<pre>+ src/tcp.c:146:1: error:</pre>
<pre>+ inlining failed in call to \
'relpTcpFreePermittedPeers': function not considered for inlining \
[-Werror=inline]</pre> <pre>+</pre>
<pre>+ src/tcp.c:158:1: error:</pre>
<pre>+ inlining failed in call to 'callOnAuthErr': \
function not considered for inlining [-Werror=inline]</pre> <pre>+</pre>
<pre>+Compiler does not inline any functions when not optimizing unless you specify \
the ‘always_inline’ attribute for the function. Add \
"__attribute__((always_inline))" to avoid these function inline \
errors.</pre> <pre>+</pre>
<pre>+Upstream-Status: Tracked by upstream bug: <a \
href="https://github.com/rsyslog/librelp/issues/256">https://github.com/rsyslog/librelp/issues/256</a></pre>
<pre>+</pre>
<pre>+Signed-off-by: Yash Shinde <a \
href="mailto:Yash.Shinde@windriver.com"><Yash.Shinde@windriver.com></a></pre> \
<pre>+---</pre> <pre>+</pre>
<pre>+diff --git a/src/relpsess.c b/src/relpsess.c</pre>
<pre>+index ee7b595..aa52b71 100644</pre>
<pre>+--- a/src/relpsess.c</pre>
<pre>++++ b/src/relpsess.c</pre>
<pre>+@@ -91,7 +91,7 @@ callOnErr(const relpSess_t *__restrict__ const pThis,</pre>
<pre>+</pre>
<pre>+</pre>
<pre>+ /* helper to free permittedPeer structure */</pre>
<pre>+-static inline void</pre>
<pre>++__attribute__((always_inline)) static inline void</pre>
<pre>+ relpSessFreePermittedPeers(relpSess_t *const pThis)</pre>
<pre>+ {</pre>
<pre>+ int i;</pre>
<pre>+diff --git a/src/tcp.c b/src/tcp.c</pre>
<pre>+index 7a75cc4..f4088c0 100644</pre>
<pre>+--- a/src/tcp.c</pre>
<pre>++++ b/src/tcp.c</pre>
<pre>+@@ -142,7 +142,7 @@ static int relpTcpChkPeerName(relpTcp_t *const pThis, void* \
cert);</pre> <pre>+</pre>
<pre>+</pre>
<pre>+ /* helper to free permittedPeer structure */</pre>
<pre>+-static inline void</pre>
<pre>++__attribute__((always_inline)) static inline void</pre>
<pre>+ relpTcpFreePermittedPeers(relpTcp_t *const pThis)</pre>
<pre>+ {</pre>
<pre>+ int i;</pre>
<pre>+@@ -154,7 +154,7 @@ relpTcpFreePermittedPeers(relpTcp_t *const pThis)</pre>
<pre>+ }</pre>
<pre>+</pre>
<pre>+ /* helper to call onAuthErr if set */</pre>
<pre>+-static inline void</pre>
<pre>++__attribute__((always_inline)) static inline void</pre>
<pre>+ callOnAuthErr(relpTcp_t *const pThis, const char *authdata, const char *emsg, \
relpRetVal ecode)</pre> <pre>+ {</pre>
<pre>+ \
pThis->pEngine->dbgprint((char*)"librelp: auth error: authdata:'%s', ecode \
%d, "</pre> <pre>+</pre>
</blockquote>
<p><o:p> </o:p></p>
<pre>-- </pre>
<pre># Randy MacLeod</pre>
<pre># Wind River Linux</pre>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier \
New""><o:p> </o:p></span></p> </div>
</body>
</html>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#101827): https://lists.openembedded.org/g/openembedded-devel/message/101827
Mute This Topic: https://lists.openembedded.org/mt/97927015/4455120
Group Owner: openembedded-devel+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [openembedded-devel@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-
--PomKjJIpOM81SCUDPi7A--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic