Message ID | 20230329123225.2048688-1-yashinde145@gmail.com |
---|---|
State | New |
Headers | show |
Series | [meta-oe] librelp: fix function inline errors in debug build | expand |
On Wed, Mar 29, 2023 at 6:12 AM Yash Shinde <yashinde145@gmail.com> 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 "> > > Upstream-Status: Tracked by upstream bug: https://github.com/rsyslog/librelp/issues/256 > > Signed-off-by: Yash Shinde <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 > This patch is missing from SRC_URI, so it won't be applied unless done so. > 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> > +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> > +--- > + > +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, " > + > -- > 2.34.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#101819): https://lists.openembedded.org/g/openembedded-devel/message/101819 > Mute This Topic: https://lists.openembedded.org/mt/97927015/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
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> +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> +--- + +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, " +
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 "> Upstream-Status: Tracked by upstream bug: https://github.com/rsyslog/librelp/issues/256 Signed-off-by: Yash Shinde <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