diff options
| author | Tianhao Wang <shrik3@riseup.net> | 2023-03-11 00:39:38 +0100 |
|---|---|---|
| committer | Tianhao Wang <shrik3@riseup.net> | 2023-03-11 00:39:38 +0100 |
| commit | 2625fd044547c7e8b8de287963ba9422aff1f051 (patch) | |
| tree | 0d48aa38831399d0006efdb18a6e983586ebb9f2 /Makefile | |
| parent | 29e28bc9c67378d0d9a7174dec6a0b541fb7f4d5 (diff) | |
fix linking
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -10,10 +10,15 @@ bootdisk.iso : kernel grub-mkrescue /usr/lib/grub/i386-pc -o bootdisk.iso isofiles kernel : rust_kernel startup.o - ld -static -e startup -T sections -o ./kernel startup.o target/x86_64_rustubs/debug/librustubs.rlib + # ar -rcs ./target/x86_64_rustubs/debug/librustubs.a ./target/x86_64-rustubs/debug/librustubs.rlib + # ld -n --gc-sections -T sections -o kernel startup.o target/x86_64-rustubs/debug/librustubs.a + ld -static -e startup -T sections -o ./kernel startup.o target/x86_64-rustubs/debug/librustubs.a rust_kernel: - cargo rustc --target=x86_64_rustubs.json -- -C link-arg=-nostartfiles --emit=obj + # cargo rustc --target=x86_64-rustubs.json -- -C link-arg=-nostartfiles --emit=obj + # cargo rustc --target=x86_64-rustubs.json -- -C link-arg=-nostartfiles --crate-type=staticlib + # xargo build --target=x86_64-rustubs + cargo xbuild --target x86_64-rustubs.json startup.o: nasm -f elf64 -o startup.o src/arch/x86_64/asm/startup.s |
