HomeFreeBSD

libcompiler_rt Makefile.inc: update _Float16/__bf16 checks

Description

libcompiler_rt Makefile.inc: update _Float16/__bf16 checks

Clang supports __bf16 for riscv from version 18.0 onwards, so update the
checks for it. While here, rewrite the checks so they are hopefully more
readable, and also handle gcc a little better.

In addition, define COMPILER_RT_HAS_FLOAT16 and COMPILER_RT_HAS_BFLOAT16
when these features should be available, since there are some parts in
compiler-rt that check for these defines.

PR: 276104
MFC after: 1 month

(cherry picked from commit f276adc148433d009d198c2ebccdd3303377e237)

Details

Provenance
dimAuthored on Apr 17 2024, 8:20 PM
Parents
rG5b763c0e1f30: Merge commit 37b7207651b4 from llvm-project (by zhongyunde@huawei.com):
Branches
Unknown
Tags
Unknown