build: fix UM build

This commit is contained in:
Loïc Grégoire
2026-04-24 14:49:25 -04:00
parent 43c6ffa04e
commit 29f5eb37ef
4 changed files with 6 additions and 4 deletions
+2
View File
@@ -225,6 +225,8 @@ fn addKernel(b: *std.Build, plat: config.Platform, optimize: std.builtin.Optimiz
.optimize = optimize,
});
translate_c.addIncludePath(.{ .cwd_relative = "/usr/include" });
kernel.root_module.addImport("c", translate_c.createModule());
kernel.linker_script = b.path("build/linker-scripts/uml.lds");
kernel.root_module.link_libc = true;
+1 -1
View File
@@ -91,7 +91,7 @@ fn map_kernel(boot_info: *pl.BootInfo) void {
pub fn init(boot_info: *pl.BootInfo) linksection(r.init) void {
mi.phys.init(boot_info);
if (!@hasDecl(config, "CONFIG_ARCH_UM")) {
if (config.arch != .um) {
map_kernel(boot_info);
}
mi.kernel_pmap.activate();
+1 -1
View File
@@ -1,5 +1,5 @@
#define _GNU_SOURCE 1
#include <SDL.h>
#include <SDL2/SDL.h>
#include <pthread.h>
#include <sched.h>
#include <signal.h>
+1 -1
View File
@@ -55,7 +55,7 @@ pub const std_options = std.Options{
pub const panic = std.debug.FullPanic(ke.panic);
pub const main = if (@hasDecl(config, "CONFIG_ARCH_UM")) pl.impl.entry.main else undefined;
pub const main = if (config.arch == .um) pl.impl.entry.main else undefined;
comptime {
// Ensure the entry point is linked in.