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

don't use special flags for strict, precise, loose, veryloose toolchain options on RISC-V #4576

Merged
merged 2 commits into from
Jul 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions easybuild/toolchains/compiler/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ class Gcc(Compiler):
COMPILER_UNIQUE_OPTION_MAP['strict'] = no_recip_alternative
COMPILER_UNIQUE_OPTION_MAP['precise'] = no_recip_alternative

# gcc on RISC-V does not support -mno-recip, -mieee-fp, -mfno-math-errno...
# https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Options.html
# there are no good alternatives, so stick to the default flags
if systemtools.get_cpu_family() == systemtools.RISCV:
COMPILER_UNIQUE_OPTION_MAP['strict'] = []
COMPILER_UNIQUE_OPTION_MAP['precise'] = []
COMPILER_UNIQUE_OPTION_MAP['loose'] = ['fno-math-errno']
COMPILER_UNIQUE_OPTION_MAP['verloose'] = ['fno-math-errno']

# used when 'optarch' toolchain option is enabled (and --optarch is not specified)
COMPILER_OPTIMAL_ARCHITECTURE_OPTION = {
(systemtools.AARCH32, systemtools.ARM): 'mcpu=native', # implies -march=native and -mtune=native
Expand Down
Loading