Files
meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-Fix-function-inline-errors-in-debug-optimization-Og.patch
Nicolas Marguet 288ad311f0 librelp: add ptest
Use internal test from librelp project as ptest.

This work is largely inspired on the rsyslog ptest implementation,
which copies the automake-based tests/Makefile to the target and runs
'make check-TESTS'. sed is used to fix a few Makefile paths or
env-vars so 'make' can run on the target.

Tested on qemux86_64 and qemuarm64:

==========================================
   librelp 1.11.0: tests/test-suite.log
==========================================

TOTAL: 30
PASS:  27
SKIP:  3
XFAIL: 0
FAIL:  0
XPASS: 0
ERROR: 0

The 3 skipped tests are either self-identified as “not do anything
really useful” or may need to port libtool to the target.

Signed-off-by: Nicolas Marguet <nicolas.marguet@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-08-15 08:31:23 -07:00

35 lines
1.2 KiB
Diff

From 6d575d98565ce3119a14359eecb11ccdff92a303 Mon Sep 17 00:00:00 2001
From: Yash Shinde <53660251+Yashinde145@users.noreply.github.com>
Date: Thu, 29 Jun 2023 18:10:15 +0530
Subject: [PATCH] Fix function inline errors in debug optimization (-Og)
Compiler does not inline any functions when using debug optimization (-Og).
Hence, remove -Winline flag when compiling with debug optimization.
Signed-off-by: Nicolas Marguet <nicolas.marguet@windriver.com>
---
Upstream-Status: Backport [https://github.com/rsyslog/librelp/commit/6d575d9]
configure.ac | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/configure.ac b/configure.ac
index 21c1fde..1204c4e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -230,6 +230,12 @@ if test "$enable_debug" = "no"; then
AC_DEFINE(NDEBUG, 1, [Defined if debug mode is disabled.])
fi
+#Compiler does not inline any functions when not optimizing(-Og).
+#Hence, remove -Winline flag when DEBUG is enabled.
+#ifdef DEBUG
+WARN_CFLAGS="$(echo "$WARN_CFLAGS" | sed s/-Winline//g)"
+#endif
+
# valgrind
AC_ARG_ENABLE(valgrind,
[AS_HELP_STRING([--enable-valgrind],[Enable valgrind tests@<:@default=yes@:>@])],
--
2.39.0