From 98f21e694a6b0964d6d08196cb6bfbc1c2ae2ff4 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 5 Jul 2024 00:02:53 +0300 Subject: fix some small build issues + Compiling for size emits memcpy() calls after they've already been removed by LTO, so add __used attribute to counteract this. Newer versions of GCC seem to prefer `-flto=auto` to just `-flto`, so use that. printf format %d -> %ld --- arch/riscv64/kernel/arch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/riscv64/kernel/arch.c') diff --git a/arch/riscv64/kernel/arch.c b/arch/riscv64/kernel/arch.c index c4009e7..ff2c04c 100644 --- a/arch/riscv64/kernel/arch.c +++ b/arch/riscv64/kernel/arch.c @@ -19,7 +19,7 @@ id_t hartid_to_cpuid(id_t hart) if (cpuid_to_hartid(i) == hart) return i; - error("failed to match hart id %d to cpu id\n", hart); + error("failed to match hart id %ld to cpu id\n", hart); /* default to zero, though this should maybe be a panic? */ return 0; } -- cgit v1.3