[compiler-rt] [builtins] Avoid using long double in FreeBSD standalone environment (PR #76175)

Dimitry Andric via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 22 10:48:26 PST 2023


DimitryAndric wrote:

Hmm I need to do a bit more work on this, since `HAS_80_BIT_LONG_DOUBLE` isn't defined for some architectures, giving me errors when building all of those architectures for FreeBSD:

```
$ grep -m1 error: /home/dim/log/universe-2023-12-22a/_.*
/home/dim/log/universe-2023-12-22a/_.arm.armv7.buildworld:/home/dim/src/freebsd/llvm-18-update/contrib/llvm-project/compiler-rt/lib/builtins/divxc3.c:20:35: error: unknown type name 'xf_float'
/home/dim/log/universe-2023-12-22a/_.arm64.aarch64.buildworld:/home/dim/src/freebsd/llvm-18-update/contrib/llvm-project/compiler-rt/lib/builtins/divxc3.c:20:35: error: unknown type name 'xf_float'; did you mean 'tf_float'?
/home/dim/log/universe-2023-12-22a/_.powerpc.powerpc64.buildworld:/home/dim/src/freebsd/llvm-18-update/contrib/llvm-project/compiler-rt/lib/builtins/divtc3.c:23:28: error: call to undeclared function 'crt_fabstf'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
/home/dim/log/universe-2023-12-22a/_.powerpc.powerpc64le.buildworld:/home/dim/src/freebsd/llvm-18-update/contrib/llvm-project/compiler-rt/lib/builtins/divtc3.c:23:28: error: call to undeclared function 'crt_fabstf'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
/home/dim/log/universe-2023-12-22a/_.riscv.riscv64.buildworld:/home/dim/src/freebsd/llvm-18-update/contrib/llvm-project/compiler-rt/lib/builtins/divxc3.c:20:35: error: unknown type name 'xf_float'; did you mean 'tf_float'?
```

@arichardson do you remember the details about this? I think `HAS_80_BIT_LONG_DOUBLE` might also have to be defined to 1 for armv7, or we have to stop building `divxc3.c`  ? And similar for aarch64 and riscv?

(The powerpc64 failures seem to be something entirely different, these are calls to undeclared `crt_fabstf` and `crt_copysigntf` functions. Not sure what is going on there.)


https://github.com/llvm/llvm-project/pull/76175


More information about the llvm-commits mailing list