-
Notifications
You must be signed in to change notification settings - Fork 929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP:riscv64-qemu target #3545
base: release
Are you sure you want to change the base?
WIP:riscv64-qemu target #3545
Conversation
rminnich
commented
Mar 13, 2023
•
edited
Loading
edited
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Early (non-final) review:
- Please add
riscv64-qemu
to builder/builder_test.go and run the test. - Please add at least a smoke test for this.
- Are you sure the compiler matches with the code? Because you're compiling with a LLVM 14 based TinyGo version and the error it gives usually indicates a version mismatch.
thanks, that was fast!, will add those things. |
ac55424
to
3ec17b4
Compare
tinygo build -target riscv64-qemu -monitor . many of these: tinygo:ld.lld: error: /home/rminnich/.cache/tinygo/thinlto/llvmcache-933570AB9628376F0C2EAD9666A92A793D143BE9:\ (function (reflect.Value).Complex: .text.(reflect.Value).Complex+0x76): relocation R_RISCV_HI20 out of range: \ 524291 is not in [-524288, 524287]; references reflect$string.170 >>> referenced by value.go:0 (/home/rminnich/tinygo/src/reflect/value.go:0) >>> defined in /home/rminnich/.cache/tinygo/thinlto/llvmcache-933570AB9628376F0C2EAD9666A92A793D143BE9 what's odd is that it the number is 524291 is 0x80003 I had to dump the llvm output to see the 0xffff_ffff bits. Signed-off-by: Ronald G. Minnich <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the status of this PR?
"build-tags": ["virt", "qemu"], | ||
"default-stack-size": 4096, | ||
"linkerscript": "targets/riscv64-qemu.ld", | ||
"emulator": "qemu-system-riscv32 -machine virt -nographic -bios none -kernel {}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qemu-system-riscv32
? That doesn't look right.
@@ -0,0 +1,8 @@ | |||
{ | |||
"inherits": ["riscv64"], | |||
"features": "+a,+c,+m,-relax,-save-restore", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These don't seem quite right, the test is complaining about it:
builder_test.go:145: target has LLVM features
"+a,+c,+m,-relax,-save-restore"
but Clang makes it
"+64bit,+a,+c,+d,+f,+m,-relax,-save-restore"