librelp: fix function inline errors in debug build
PATCH v2 1/1 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.
Also revert the work-around made earlier in librelp_1.11.0.bb.
Upstream-Status: Tracked by upstream bug: https://github.com/rsyslog/librelp/issues/256
--- ...01-librelp-fix-function-inline-error.patch | 58 +++++++++++++++++++ .../rsyslog/librelp_1.11.0.bb | 2 +- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patch
meta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patch new file +58 -0
@@ -0,0 +1,58 @@ +From dc841f01fb6167ec9a80e373c5f4d2f5e3222ed6 Mon Sep 17 00:00:00 2001 +From: Yash Shinde <Yash.Shinde@...> +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@...> +--- + +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, "
meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb +1 -1
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1fb9c10ed9fd6826757615455ca893a9" DEPENDS = "gmp nettle libidn zlib gnutls openssl" SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https;branch=stable \ + file://0001-librelp-fix-function-inline-error.patch \ " SRCREV = "b421f56d9ee31a966058d23bd23c966221c91396"
@@ -15,6 +16,5 @@ S = "${WORKDIR}/git" inherit autotools pkgconfig -DEBUG_OPTIMIZATION:append = " -Wno-error=inline"
Signature · 1 line
2.34.1
Quoted 11 lines · Yash Shinde
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]
Quoted 6 lines
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.
Also revert the work-around made earlier in librelp_1.11.0.bb.
Upstream-Status: Tracked by upstream bug:https://github.com/rsyslog/librelp/issues/256
This is a less instrusive work-around.
Please create a gcc bug to track the compiler regression and reply here with the ID. As well, note the gcc bug id in the librelp issue. Once the compiler is fixed, we can close the librelp bug.
../Randy
Quoted 91 lines
Signed-off-by Yash Shinde<[email protected]>--- ...01-librelp-fix-function-inline-error.patch | 58 +++++++++++++++++++ .../rsyslog/librelp_1.11.0.bb | 2 +- 2 files changed, 59 insertions(+), 1 deletion(-)create mode 100644
meta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patchmeta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patch new file +58
-0@@ -0,0 +1,58 @@ +From dc841f01fb6167ec9a80e373c5f4d2f5e3222ed6 Mon Sep 17 00:00:00 2001 +From: Yash Shinde<Yash.Shinde@...> +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@...> +--- + +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, "meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb +1
-1@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM ="file://COPYING;md5=1fb9c10ed9fd6826757615455ca893a9" DEPENDS = "gmp nettle libidn zlib gnutls openssl" SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https;branch=stable \ +file://0001-librelp-fix-function-inline-error.patch \ " SRCREV = "b421f56d9ee31a966058d23bd23c966221c91396"@@ -15,6 +16,5 @@ S = "${WORKDIR}/git" inherit autotools pkgconfig -DEBUG_OPTIMIZATION:append = " -Wno-error=inline"
Signature · 2 lines
# Randy MacLeod # Wind River Linux
also patch does not apply cleanly
27772 Applying patch 0001-librelp-fix-function-inline-error.patch 27773 patching file src/relpsess.c
27774 Hunk #1 succeeded at 91 with fuzz 1.
27775 patching file src/tcp.c
27776 Hunk #1 succeeded at 142 with fuzz 1.
27777 Hunk #2 succeeded at 154 with fuzz 1.
Quoted 135 lines · Randy MacLeod
On 2023-03-30 01:44, 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.
Also revert the work-around made earlier in librelp_1.11.0.bb.
Upstream-Status: Tracked by upstream bug: https://github.com/rsyslog/librelp/issues/256
This is a less instrusive work-around.
Please create a gcc bug to track the compiler regression and reply here with the ID. As well, note the gcc bug id in the librelp issue. Once the compiler is fixed, we can close the librelp bug.
../Randy
Signed-off-by Yash Shinde <[email protected]>--- ...01-librelp-fix-function-inline-error.patch | 58 +++++++++++++++++++ .../rsyslog/librelp_1.11.0.bb | 2 +- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patchmeta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patch new file +58
-0@@ -0,0 +1,58 @@ +From dc841f01fb6167ec9a80e373c5f4d2f5e3222ed6 Mon Sep 17 00:00:00 2001 +From: Yash Shinde <Yash.Shinde@...> +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@...> +--- + +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, "meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb +1
-2@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1fb9c10ed9fd6826757615455ca893a9" DEPENDS = "gmp nettle libidn zlib gnutls openssl" SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https;branch=stable \ + file://0001-librelp-fix-function-inline-error.patch \ " SRCREV = "b421f56d9ee31a966058d23bd23c966221c91396"@@ -15,6 +16,5 @@ S = "${WORKDIR}/git" inherit autotools pkgconfig -DEBUG_OPTIMIZATION:append = " -Wno-error=inline" --# Randy MacLeod
# Wind River Linux-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#101831): https://lists.openembedded.org/g/openembedded-devel/message/101831
Mute This Topic: https://lists.openembedded.org/mt/97944957/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
I did get the patch fuzz while testing and fixed it using the devtool command. I am not sure how it came back. Will check.
Regards,
Yash
From: Khem Raj<mailto:[email protected]>
Sent: 30 March 2023 18:52
To: MacLeod, Randy<mailto:[email protected]>
Cc: Yash Shinde<mailto:[email protected]>; [email protected]<mailto:[email protected]>; Kokkonda, Sundeep<mailto:[email protected]>; Shinde, Yash<mailto:[email protected]>
Subject: Re: [oe] [meta-oe][PATCH v2] librelp: fix function inline errors in debug build
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.
also patch does not apply cleanly
27772 Applying patch 0001-librelp-fix-function-inline-error.patch 27773 patching file src/relpsess.c
27774 Hunk #1 succeeded at 91 with fuzz 1.
27775 patching file src/tcp.c
27776 Hunk #1 succeeded at 142 with fuzz 1.
27777 Hunk #2 succeeded at 154 with fuzz 1.
Quoted 135 lines · Randy MacLeod
On 2023-03-30 01:44, 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.
Also revert the work-around made earlier in librelp_1.11.0.bb.
Upstream-Status: Tracked by upstream bug: https://github.com/rsyslog/librelp/issues/256
This is a less instrusive work-around.
Please create a gcc bug to track the compiler regression and reply here with the ID. As well, note the gcc bug id in the librelp issue. Once the compiler is fixed, we can close the librelp bug.
../Randy
Signed-off-by Yash Shinde <[email protected]>--- ...01-librelp-fix-function-inline-error.patch | 58 +++++++++++++++++++ .../rsyslog/librelp_1.11.0.bb | 2 +- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patchmeta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patch new file +58
-0@@ -0,0 +1,58 @@ +From dc841f01fb6167ec9a80e373c5f4d2f5e3222ed6 Mon Sep 17 00:00:00 2001 +From: Yash Shinde <Yash.Shinde@...> +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@...> +--- + +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, "meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb +1
-2@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1fb9c10ed9fd6826757615455ca893a9" DEPENDS = "gmp nettle libidn zlib gnutls openssl" SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https;branch=stable \ + file://0001-librelp-fix-function-inline-error.patch \ " SRCREV = "b421f56d9ee31a966058d23bd23c966221c91396"@@ -15,6 +16,5 @@ S = "${WORKDIR}/git" inherit autotools pkgconfig -DEBUG_OPTIMIZATION:append = " -Wno-error=inline" --# Randy MacLeod
# Wind River Linux-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#101831): https://lists.openembedded.org/g/openembedded-devel/message/101831
Mute This Topic: https://lists.openembedded.org/mt/97944957/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-