summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-extended/rsyslog/files/0001-Fix-function-inline-errors-in-debug-optimization-Og.patch34
-rw-r--r--meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb5
2 files changed, 35 insertions, 4 deletions
diff --git a/meta-oe/recipes-extended/rsyslog/files/0001-Fix-function-inline-errors-in-debug-optimization-Og.patch b/meta-oe/recipes-extended/rsyslog/files/0001-Fix-function-inline-errors-in-debug-optimization-Og.patch
new file mode 100644
index 0000000000..10e2b564cc
--- /dev/null
+++ b/meta-oe/recipes-extended/rsyslog/files/0001-Fix-function-inline-errors-in-debug-optimization-Og.patch
@@ -0,0 +1,34 @@
1From 6d575d98565ce3119a14359eecb11ccdff92a303 Mon Sep 17 00:00:00 2001
2From: Yash Shinde <53660251+Yashinde145@users.noreply.github.com>
3Date: Thu, 29 Jun 2023 18:10:15 +0530
4Subject: [PATCH] Fix function inline errors in debug optimization (-Og)
5
6Compiler does not inline any functions when using debug optimization (-Og).
7Hence, remove -Winline flag when compiling with debug optimization.
8
9Signed-off-by: Nicolas Marguet <nicolas.marguet@windriver.com>
10---
11Upstream-Status: Backport [https://github.com/rsyslog/librelp/commit/6d575d9]
12
13 configure.ac | 6 ++++++
14 1 file changed, 6 insertions(+)
15
16diff --git a/configure.ac b/configure.ac
17index 21c1fde..1204c4e 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -230,6 +230,12 @@ if test "$enable_debug" = "no"; then
21 AC_DEFINE(NDEBUG, 1, [Defined if debug mode is disabled.])
22 fi
23
24+#Compiler does not inline any functions when not optimizing(-Og).
25+#Hence, remove -Winline flag when DEBUG is enabled.
26+#ifdef DEBUG
27+WARN_CFLAGS="$(echo "$WARN_CFLAGS" | sed s/-Winline//g)"
28+#endif
29+
30 # valgrind
31 AC_ARG_ENABLE(valgrind,
32 [AS_HELP_STRING([--enable-valgrind],[Enable valgrind tests@<:@default=yes@:>@])],
33--
342.39.0
diff --git a/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb b/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb
index e7b79ad03f..bac5abb052 100644
--- a/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb
+++ b/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1fb9c10ed9fd6826757615455ca893a9"
7DEPENDS = "gmp nettle libidn zlib gnutls openssl" 7DEPENDS = "gmp nettle libidn zlib gnutls openssl"
8 8
9SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https;branch=stable \ 9SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https;branch=stable \
10 file://0001-Fix-function-inline-errors-in-debug-optimization-Og.patch \
10" 11"
11 12
12SRCREV = "b421f56d9ee31a966058d23bd23c966221c91396" 13SRCREV = "b421f56d9ee31a966058d23bd23c966221c91396"
@@ -14,7 +15,3 @@ SRCREV = "b421f56d9ee31a966058d23bd23c966221c91396"
14S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"
15 16
16inherit autotools pkgconfig 17inherit autotools pkgconfig
17
18DEBUG_OPTIMIZATION:append = " -Wno-error=inline"
19
20