-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Set qemu cpu option from ELF attribute #1233
Conversation
scripts/march-to-cpu-opt
Outdated
pos64 = val.find("rv64") | ||
# MAGIC WORKAROUND | ||
# Some version of pyelftools has issue for parsing | ||
# Tag number =5, it will wrongly parse it become |
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.
missing space
scripts/march-to-cpu-opt
Outdated
@@ -26,6 +29,7 @@ def parse_opt(argv): | |||
parser = argparse.ArgumentParser() | |||
parser.add_argument('-march', '--with-arch', type=str, dest='march') | |||
parser.add_argument('-selftest', action='store_true') | |||
parser.add_argument('--with-elf', type=str) |
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.
Why not --get-riscv-tag
?
I'm still a bit wary of cost (delay) considering qemu runs are not currently parallelized. And multilib is what takes forover so we can help speed it up by avoiding all this (using additional makefile foo/bar) and with equivalent of following in run script.
|
I was thinking of proposing rv$XLEN as well, because QEMU enables many extensions by default. |
Not sure what yo mean about not parallelized? Gcc test suite should be parallelized just by -j I think?
That seems can’t handle those extension not enabled by default? |
Ah I'm stupid. I was not passing -j to test run :-(
The point is those vendor extensions are not run as part of standard multilib runs. But anyways elf parsing feels more future proof so yes fine by me. |
This could help multi-lib testing, but the price is slightly increase the testing time since it will need to extract ELF attribute from binary before running qemu. But I think the cost is acceptable compare to make build system more complicate, and actually we already use this approach in our internal stuffs for years.
This could help multi-lib testing, but the price is slightly increase the testing time since it will need to extract ELF attribute from binary before running qemu.
But I think the cost is acceptable compare to make build system more complicate, and actually we already use this approach in our internal stuffs for years.
Fix #1206.