Skip to content

Conversation

@yaroslavsadin
Copy link
Collaborator

Default -mabi and -march mess with some tests' settings which results in errors.

@yaroslavsadin yaroslavsadin self-assigned this Mar 10, 2025
@luismgsilva
Copy link
Member

Out of curiosity, how are you passing the -mtune? "CFLAGS_FOR_TARGET"?

@yaroslavsadin
Copy link
Collaborator Author

Out of curiosity, how are you passing the -mtune? "CFLAGS_FOR_TARGET"?

This is done internally using ARC_MULTILIB_OPTIONS env variable and then processed here:

return $env(ARC_MULTILIB_OPTIONS)

For historical reasons the code to run DejaGNU is split between this repo and VAS.

@yaroslavsadin
Copy link
Collaborator Author

yaroslavsadin commented Mar 10, 2025

@luismgsilva Not sure if removing -march wouldn't results in issues due to missing extensions. Probably we need to test this first.

Note the nSIM flags:

"-all.i.zicsr.zifencei.zihintpause.b.zca.zcb.zcmp.zcmt.a.m.zbb.zba.zbs"

@luismgsilva
Copy link
Member

Isn't it possible to use a simulator wrapper? Like @kolerov did: foss-for-synopsys-dwc-arc-processors/arcv-gnu-toolchain@0008616

@yaroslavsadin
Copy link
Collaborator Author

Isn't it possible to use a simulator wrapper? Like @kolerov did: foss-for-synopsys-dwc-arc-processors/arcv-gnu-toolchain@0008616

I think we can, but the question is, are we good leaving -march and -mabi empty, as majority of the tests won't have them defined? Are there any defaults we're ok with and can deduct from the resulting ELF file?

@luismgsilva
Copy link
Member

luismgsilva commented Mar 11, 2025

Isn't it possible to use a simulator wrapper? Like @kolerov did: foss-for-synopsys-dwc-arc-processors/arcv-gnu-toolchain@0008616

I think we can, but the question is, are we good leaving -march and -mabi empty, as majority of the tests won't have them defined? Are there any defaults we're ok with and can deduct from the resulting ELF file?

The configuration used to build the toolchain is used as default when invoking GCC.

@yaroslavsadin yaroslavsadin marked this pull request as draft March 11, 2025 12:19
@yaroslavsadin
Copy link
Collaborator Author

The configuration used to build the toolchain is used as default when invoking GCC.

Guess that's not that easy:

$ riscv64-elf-gcc -mtune=arc-v-rmx-100-series test.c 
riscv64-elf-gcc: fatal error: Cannot find suitable multilib set for '-march=rv64imafdc_zicsr_zifencei'/'-mabi=lp64d'
compilation terminated.

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

Successfully merging this pull request may close these issues.

3 participants