From 9310e4d7971e05ee0cfdecd6821002103cc83bd7 Mon Sep 17 00:00:00 2001 From: Terje Kvernes Date: Thu, 3 Sep 2020 10:13:03 +0200 Subject: [PATCH] More toolchain fixing for aarch64. - Both strict and precise use no-recip. - strict wants -mieee-fp. :-( --- easybuild/toolchains/compiler/gcc.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/easybuild/toolchains/compiler/gcc.py b/easybuild/toolchains/compiler/gcc.py index 223361c4eb..ce43bde028 100644 --- a/easybuild/toolchains/compiler/gcc.py +++ b/easybuild/toolchains/compiler/gcc.py @@ -69,12 +69,12 @@ class Gcc(Compiler): DEFAULT_OPT_LEVEL: ['O2', 'ftree-vectorize'], } - # aarch64 does not support -mno-recip for precision. Based on - # https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html the following options are used instead + # gcc on aarch64 does not support -mno-recip, -mieee-fp, -mfno-math-errno... + # https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html if systemtools.get_cpu_architecture() == systemtools.AARCH64: - COMPILER_UNIQUE_OPTION_MAP['precise'] = ['mno-low-precision-recip-sqrt', - 'mno-low-precision-sqrt', - 'mno-low-precision-div'] + no_recip_alternative = ['mno-low-precision-recip-sqrt', 'mno-low-precision-sqrt', 'mno-low-precision-div'] + COMPILER_UNIQUE_OPTION_MAP['strict'] = no_recip_alternative + COMPILER_UNIQUE_OPTION_MAP['precise'] = no_recip_alternative # used when 'optarch' toolchain option is enabled (and --optarch is not specified) COMPILER_OPTIMAL_ARCHITECTURE_OPTION = {