From 754d5e4be27fde4b22586721cbc4d58bce0ca246 Mon Sep 17 00:00:00 2001 From: Patrick Date: Thu, 8 Aug 2024 18:11:27 +0200 Subject: [PATCH] cfi native works??????? --- ignore_list.txt | 1 - include/zephyr/sys/cbprintf.h | 2 +- lib/os/printk.c | 2 +- scripts/native_simulator/Makefile | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ignore_list.txt b/ignore_list.txt index aab45b8740..a61e6ff8fd 100644 --- a/ignore_list.txt +++ b/ignore_list.txt @@ -1,2 +1 @@ src:*/native_simulator/* -fun:z_cbvprintf_impl diff --git a/include/zephyr/sys/cbprintf.h b/include/zephyr/sys/cbprintf.h index 43fe4f921e..2f85e00ae8 100644 --- a/include/zephyr/sys/cbprintf.h +++ b/include/zephyr/sys/cbprintf.h @@ -299,7 +299,7 @@ BUILD_ASSERT(Z_IS_POW2(CBPRINTF_PACKAGE_ALIGNMENT)); #ifdef __CHECKER__ typedef int (*cbprintf_cb)(int c, void *ctx); #else -typedef int (*cbprintf_cb)(/* int c, void *ctx */); +typedef int (*cbprintf_cb)(int, void *); #endif /** @brief Signature for a cbprintf multibyte callback function. diff --git a/lib/os/printk.c b/lib/os/printk.c index 71a0d6aeac..1b2d51de3b 100644 --- a/lib/os/printk.c +++ b/lib/os/printk.c @@ -255,7 +255,7 @@ int vsnprintk(char *str, size_t size, const char *fmt, va_list ap) { struct str_context ctx = { str, size, 0 }; - cbvprintf(str_out, &ctx, fmt, ap); + cbvprintf((cbprintf_cb)str_out, &ctx, fmt, ap); if (ctx.count < ctx.max) { str[ctx.count] = '\0'; diff --git a/scripts/native_simulator/Makefile b/scripts/native_simulator/Makefile index 242ef9c0fc..0a6aa61866 100644 --- a/scripts/native_simulator/Makefile +++ b/scripts/native_simulator/Makefile @@ -134,7 +134,6 @@ ${NSI_EXE}: ${NSI_BUILD_PATH}/${RUNNER_LIB} ${LOCALIZED_EMBSW} ${NSI_EXTRA_LIBS} -B /nix/store/dbwp0scbb0rk78m636sb7cvycz8xzgyh-glibc-2.39-52/lib \ -B /nix/store/qfqjymymsd2x29yknsgllfiq1h64s3f4-gcc-12.3.0/lib/gcc/x86_64-unknown-linux-gnu/12.3.0/ \ -L /nix/store/qfqjymymsd2x29yknsgllfiq1h64s3f4-gcc-12.3.0/lib/gcc/x86_64-unknown-linux-gnu/12.3.0/ \ - -lclang_rt.ubsan_standalone Makefile: ;