HomeFreeBSD

Add atomic and bswap functions to libcompiler_rt

Description

Add atomic and bswap functions to libcompiler_rt

There have been several mentions on our mailing lists about missing
atomic functions in our system libraries (e.g. atomic_load_8 and
friends), and recently I saw
bswapdi2 and __bswapsi2 mentioned too.

To address this, add implementations for the functions from compiler-rt
to the system compiler support libraries, e.g. libcompiler_rt.a and and
libgcc_s.so.

This also needs a small fixup in compiler-rt's atomic.c, to ensure that
32-bit mips can build correctly.

Bump __FreeBSD_version to make it easier for port maintainers to detect
when these functions were added.

MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D26159

(cherry picked from commit 46c8c5540fe4995e01fcf2e173c05761e7ba9488)

Details

Provenance
dimAuthored on Aug 25 2020, 6:49 AM
Differential Revision
D26159: Add atomic and bswap functions to libcompiler_rt
Parents
rGfc387bb3ea46: Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
Branches
Unknown
Tags
Unknown