Update the toolchain

This commit is contained in:
Eugen Wissner 2024-02-15 15:13:47 +01:00
parent 0d3453e7a9
commit df2494e145
Signed by: belka
GPG Key ID: A27FDC1E8EE902C0
2 changed files with 6 additions and 5 deletions

View File

@ -21,13 +21,13 @@ CLEAN.include '.dub'
rule(/build\/riscv\/[^\/\.]+$/ => ->(file) { test_for_out(file, '.o') }) do |t| rule(/build\/riscv\/[^\/\.]+$/ => ->(file) { test_for_out(file, '.o') }) do |t|
sh '/opt/riscv/bin/riscv32-unknown-elf-ld', sh '/opt/riscv/bin/riscv32-unknown-elf-ld',
'-o', t.name, '-o', t.name,
'-L/opt/riscv/lib/gcc/riscv32-unknown-elf/11.1.0', '-L/opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/',
'-L/opt/riscv/riscv32-unknown-elf/lib', '-L/opt/riscv/riscv32-unknown-elf/lib',
'/opt/riscv/riscv32-unknown-elf/lib/crt0.o', '/opt/riscv/riscv32-unknown-elf/lib/crt0.o',
'/opt/riscv/lib/gcc/riscv32-unknown-elf/11.1.0/crtbegin.o', '/opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/crtbegin.o',
t.source, t.source,
'--start-group', '-lgcc', '-lc', '-lgloss', '--end-group', '--start-group', '-lgcc', '-lc', '-lgloss', '--end-group',
'/opt/riscv/lib/gcc/riscv32-unknown-elf/11.1.0/crtend.o' '/opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/crtend.o'
end end
rule(/build\/riscv\/.+\.o$/ => ->(file) { test_for_object(file, '.eln') }) do |t| rule(/build\/riscv\/.+\.o$/ => ->(file) { test_for_object(file, '.eln') }) do |t|
@ -36,7 +36,7 @@ rule(/build\/riscv\/.+\.o$/ => ->(file) { test_for_object(file, '.eln') }) do |t
end end
file BINARY => SOURCES do |t| file BINARY => SOURCES do |t|
sh({ 'DFLAGS' => (DFLAGS * ' ') }, 'dub', 'build', '--compiler=gdc-12') sh({ 'DFLAGS' => (DFLAGS * ' ') }, 'dub', 'build', '--compiler=gdc')
end end
task default: BINARY task default: BINARY
@ -55,6 +55,7 @@ task test: BINARY do
if test.include? '/riscv/' if test.include? '/riscv/'
spike = [ spike = [
'/opt/riscv/bin/spike', '/opt/riscv/bin/spike',
'--isa=RV32IMAC',
'/opt/riscv/riscv32-unknown-elf/bin/pk', '/opt/riscv/riscv32-unknown-elf/bin/pk',
test test
] ]

View File

@ -1,6 +1,6 @@
{ {
"dependencies": { "dependencies": {
"tanya": "~>0.18.0" "tanya": "~>0.19.0"
}, },
"name": "elna", "name": "elna",
"targetType": "executable", "targetType": "executable",