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'