File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
easybuild/toolchains/compiler Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,15 @@ class Gcc(Compiler):
7878 COMPILER_UNIQUE_OPTION_MAP ['strict' ] = no_recip_alternative
7979 COMPILER_UNIQUE_OPTION_MAP ['precise' ] = no_recip_alternative
8080
81+ # gcc on RISC-V does not support -mno-recip, -mieee-fp, -mfno-math-errno...
82+ # https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Options.html
83+ # there are no good alternatives, so stick to the default flags
84+ if systemtools .get_cpu_family () == systemtools .RISCV :
85+ COMPILER_UNIQUE_OPTION_MAP ['strict' ] = []
86+ COMPILER_UNIQUE_OPTION_MAP ['precise' ] = []
87+ COMPILER_UNIQUE_OPTION_MAP ['loose' ] = ['fno-math-errno' ]
88+ COMPILER_UNIQUE_OPTION_MAP ['verloose' ] = ['fno-math-errno' ]
89+
8190 # used when 'optarch' toolchain option is enabled (and --optarch is not specified)
8291 COMPILER_OPTIMAL_ARCHITECTURE_OPTION = {
8392 (systemtools .AARCH32 , systemtools .ARM ): 'mcpu=native' , # implies -march=native and -mtune=native
You can’t perform that action at this time.
0 commit comments