Skip to content
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

Build failing on RISC-V #39

Open
Simon04090 opened this issue Nov 20, 2022 · 1 comment
Open

Build failing on RISC-V #39

Simon04090 opened this issue Nov 20, 2022 · 1 comment

Comments

@Simon04090
Copy link

I am currently working on a project where we are using xed to decode x86 binaries.
Now we are trying to expand our support to RISC-V (as host architecture).

But we noticed that xed is not able to be built on RISC-V, because normalize_cpu_name does not understand riscv64.

Simply adding another branch for "riscv64" here fixes it according to my testing:

mbuild/mbuild/env.py

Lines 1218 to 1240 in 75cb46e

def _normalize_cpu_name(self, name):
"""Internal function. Standardize various CPU identifiers"""
if name in ['ia32', 'i386', 'i686','x86']:
return 'ia32'
elif name in ['ia32e', 'x86_64', 'amd64',
'x86-64', 'Intel64','intel64']:
return 'x86-64'
elif name == 'ia64':
return 'ipf'
elif name[0:5] == 'EM64T':
return 'x86-64'
elif name[0:7] == 'Intel64':
return 'x86-64'
elif name == 'intel64':
return 'x86-64'
elif name[0:5] == 'AMD64':
return 'x86-64'
elif name[0:3] == 'x86':
return 'ia32'
elif name in ['aarch64', 'arm64']:
return 'aarch64'
else:
die("Unknown cpu " + name)

@marjevan
Copy link
Member

Thanks for the report.
We'll check it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants