File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
components/lwp/vdso/user/arch/risc-v Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,11 @@ def get_riscv64_default_arch_abi(gcc_bin):
1818 arch = None
1919 abi = None
2020 for line in result .splitlines ():
21- if '-march=' in line and '[default]' in line :
22- arch = line .strip ().split ()[0 ]
23- if '-mabi=' in line and '[default]' in line :
24- abi = line .strip ().split ()[0 ]
21+ if '-march=' in line :
22+ arch = line .strip ().split ()[1 ]
23+ arch = arch .split ('_' )[0 ] # Get the base architecture, e.g., rv64imafdc
24+ if '-mabi=' in line and 'option' not in line :
25+ abi = line .strip ().split ()[1 ]
2526 return arch , abi
2627 except Exception as e :
2728 print ("Error getting arch/abi:" , e )
@@ -31,7 +32,7 @@ def get_riscv64_default_arch_abi(gcc_bin):
3132CC_BIN = PREFIX + 'gcc'
3233arch , abi = get_riscv64_default_arch_abi (CC_BIN )
3334if arch and abi :
34- DEVICE = f' { arch } { abi } '
35+ DEVICE = f' -march= { arch } -mabi= { abi } '
3536else :
3637 DEVICE = ' -march=rv64imafdc -mabi=lp64' # fallback
3738
You can’t perform that action at this time.
0 commit comments