From 4a9d3a24d56363107b01092aa6e33f8a9aa8c477 Mon Sep 17 00:00:00 2001 From: Quantum Date: Tue, 7 Jun 2022 00:59:27 -0400 Subject: [PATCH] Renamed riscv -> riscv64 to make meson happy --- kernel/arch/{riscv => riscv64}/entry.S | 0 kernel/arch/{riscv => riscv64}/meson.build | 0 .../arch/{riscv => riscv64}/platform/allwinner-d1/meson.build | 3 +++ .../arch/{riscv => riscv64}/platform/allwinner-d1/platform.ld | 0 kernel/arch/{riscv => riscv64}/platform/qemu/meson.build | 4 ++++ kernel/arch/{riscv => riscv64}/platform/qemu/platform.ld | 0 riscv.cross | 2 +- 7 files changed, 8 insertions(+), 1 deletion(-) rename kernel/arch/{riscv => riscv64}/entry.S (100%) rename kernel/arch/{riscv => riscv64}/meson.build (100%) rename kernel/arch/{riscv => riscv64}/platform/allwinner-d1/meson.build (90%) rename kernel/arch/{riscv => riscv64}/platform/allwinner-d1/platform.ld (100%) rename kernel/arch/{riscv => riscv64}/platform/qemu/meson.build (85%) rename kernel/arch/{riscv => riscv64}/platform/qemu/platform.ld (100%) diff --git a/kernel/arch/riscv/entry.S b/kernel/arch/riscv64/entry.S similarity index 100% rename from kernel/arch/riscv/entry.S rename to kernel/arch/riscv64/entry.S diff --git a/kernel/arch/riscv/meson.build b/kernel/arch/riscv64/meson.build similarity index 100% rename from kernel/arch/riscv/meson.build rename to kernel/arch/riscv64/meson.build diff --git a/kernel/arch/riscv/platform/allwinner-d1/meson.build b/kernel/arch/riscv64/platform/allwinner-d1/meson.build similarity index 90% rename from kernel/arch/riscv/platform/allwinner-d1/meson.build rename to kernel/arch/riscv64/platform/allwinner-d1/meson.build index 2713137..fd529fa 100644 --- a/kernel/arch/riscv/platform/allwinner-d1/meson.build +++ b/kernel/arch/riscv64/platform/allwinner-d1/meson.build @@ -1,3 +1,5 @@ +cxx = meson.get_compiler('cpp') +gcc_dep = cxx.find_library('gcc', required: true) objcopy = find_program('riscv64-linux-gnu-objcopy') mkimage = find_program('mkimage') @@ -9,6 +11,7 @@ elf = executable( 'kernel.elf', arch_sources, include_directories: includes, + dependencies: gcc_dep, link_args: [ '-Wl,-T,' + meson.current_source_dir() + '/platform.ld', '-static' diff --git a/kernel/arch/riscv/platform/allwinner-d1/platform.ld b/kernel/arch/riscv64/platform/allwinner-d1/platform.ld similarity index 100% rename from kernel/arch/riscv/platform/allwinner-d1/platform.ld rename to kernel/arch/riscv64/platform/allwinner-d1/platform.ld diff --git a/kernel/arch/riscv/platform/qemu/meson.build b/kernel/arch/riscv64/platform/qemu/meson.build similarity index 85% rename from kernel/arch/riscv/platform/qemu/meson.build rename to kernel/arch/riscv64/platform/qemu/meson.build index bd100e0..aef4ae2 100644 --- a/kernel/arch/riscv/platform/qemu/meson.build +++ b/kernel/arch/riscv64/platform/qemu/meson.build @@ -1,7 +1,11 @@ +cxx = meson.get_compiler('cpp') +gcc_dep = cxx.find_library('gcc', required: true) + elf = executable( 'kernel.elf', arch_sources, include_directories: includes, + dependencies: gcc_dep, link_args: [ '-Wl,-T,' + meson.current_source_dir() + '/platform.ld', '-static' diff --git a/kernel/arch/riscv/platform/qemu/platform.ld b/kernel/arch/riscv64/platform/qemu/platform.ld similarity index 100% rename from kernel/arch/riscv/platform/qemu/platform.ld rename to kernel/arch/riscv64/platform/qemu/platform.ld diff --git a/riscv.cross b/riscv.cross index e0e430f..66ea0d0 100644 --- a/riscv.cross +++ b/riscv.cross @@ -4,7 +4,7 @@ cpp = 'riscv64-linux-gnu-g++' [host_machine] system = 'riscv-qtech-os' -cpu_family = 'riscv' +cpu_family = 'riscv64' cpu = 'rv64' endian = 'little'