[all-commits] [llvm/llvm-project] 78cd15: [libc][AArch64] Fix fullbuild when using G++/GCC

David Spickett via All-commits all-commits at lists.llvm.org
Mon Feb 20 00:40:23 PST 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 78cd158cf92ce5abdf5e68230b68b06b57354a0f
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2023-02-20 (Mon, 20 Feb 2023)

  Changed paths:
    M libc/src/__support/FPUtil/aarch64/FEnvImpl.h
    M libc/src/__support/threads/linux/thread.cpp

  Log Message:
  [libc][AArch64] Fix fullbuild when using G++/GCC

The libc uses some functions that GCC does not currently
implement, that come from Arm's ACLE header usually.

These are:

This issue was reported to us (https://github.com/llvm/llvm-project/issues/60473)
and I've then reported that back to GCC (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108642).

Even if these functions are added, clang has some non standard extensions
to them that gcc may not take. So we're looking at a fix in gcc 13 at best,
and that may not be enough for what we're doing with them.

So I've added ifdefs to use alternatives with gcc.

For handling the stack pointer, inline assembly is unfortunately the only option.
I have verified that the single mov is essentially what __arm_rsr64 generates.

For fpsr and fpcr the gcc devs suggested using

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D143261

More information about the All-commits mailing list