mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[build] Add build knowledge of dynamic libraries
Bonnibel will now build dynamic libraries when they're dependencies for non-statically linked modules. It will also copy those shared libraries into the initrd image for programs being copied into the image.
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
|
||||
boot = module("boot",
|
||||
kind = "exe",
|
||||
output = "boot.efi",
|
||||
outfile = "boot.efi",
|
||||
targets = [ "boot" ],
|
||||
deps = [ "cpu", "elf", "util", "bootproto" ],
|
||||
static = True,
|
||||
sources = [
|
||||
"allocator.cpp",
|
||||
"bootconfig.cpp",
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# vim: ft=python
|
||||
|
||||
kernel = module("kernel",
|
||||
kind = "exe",
|
||||
default = True,
|
||||
output = "jsix.elf",
|
||||
basename = "jsix",
|
||||
targets = [ "kernel" ],
|
||||
description = "jsix kernel",
|
||||
deps = [ "util", "cpu", "bootproto", "j6" ],
|
||||
static = True,
|
||||
ld_script = "kernel.ld",
|
||||
sources = [
|
||||
"apic.cpp",
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# vim: ft=python
|
||||
|
||||
panic = module("panic.serial",
|
||||
kind = "exe",
|
||||
targets = [ "kernel" ],
|
||||
deps = [ "util", "elf", "kernel" ],
|
||||
static = True,
|
||||
includes = [ ".." ],
|
||||
description = "Serial panic handler",
|
||||
ld_script = "panic.serial.ld",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# vim: ft=python
|
||||
|
||||
bp = module("bootproto",
|
||||
kind = "lib",
|
||||
kind = "headers",
|
||||
public_headers = [
|
||||
"bootproto/acpi.h",
|
||||
"bootproto/bootconfig.h",
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# vim: ft=python
|
||||
|
||||
libc_free = module("libc_free",
|
||||
kind = "lib",
|
||||
kind = "headers",
|
||||
basename = "libc_free",
|
||||
no_libc = True,
|
||||
include_phase = "late",
|
||||
public_headers = [
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# vim: ft=python
|
||||
|
||||
ldso = module("ld.so",
|
||||
kind = "shared",
|
||||
output = "ld.so",
|
||||
kind = "lib",
|
||||
static = True,
|
||||
basename = "ld",
|
||||
targets = [ "user" ],
|
||||
deps = [ "libc", "util", "elf" ],
|
||||
description = "Dynamic Linker",
|
||||
@@ -12,4 +13,4 @@ ldso = module("ld.so",
|
||||
"start.s",
|
||||
])
|
||||
|
||||
ldso.variables["ldflags"] = ["${ldflags}", "--entry=_ldso_start"]
|
||||
ldso.variables["ldflags"] = ["${ldflags}", "--entry=_ldso_start"]
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
init = module("srv.init",
|
||||
targets = [ "init" ],
|
||||
deps = [ "libc", "elf", "bootproto", "zstd" ],
|
||||
static = True,
|
||||
description = "Init server",
|
||||
ld_script = "init.ld",
|
||||
sources = [
|
||||
|
||||
Reference in New Issue
Block a user