https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230888

--- Comment #41 from commit-h...@freebsd.org ---
A commit in branch releng/11.4 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=7b67d47c70cca47f65fbbc9d8607b7516c2a82ee

commit 7b67d47c70cca47f65fbbc9d8607b7516c2a82ee
Author:     Dimitry Andric <d...@freebsd.org>
AuthorDate: 2020-09-12 16:33:05 +0000
Commit:     Ed Maste <ema...@freebsd.org>
CommitDate: 2021-01-29 00:07:08 +0000

    MFC r364753: 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.

    Differential Revision: https://reviews.freebsd.org/D26159

    MFC r364782:

    After r364753, there should be no need to suppress -Watomic-alignment
    warnings anymore for compiler-rt's atomic.c. This occurred because the
    IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this
    caused the compiler to emit a runtime call to __atomic_is_lock_free(),
    and that triggers the warning.

    MFC r365509:

    Follow-up r364753 by enabling compiler-rt's atomic implementation only
    for clang, as it uses clang specific builtins, and does not compile
    correctly with gcc. Note that gcc packages usually come with their own
    libatomic, providing these primitives.

    MFC r365588:

    Follow-up r364753 by only using arm's stdatomic.c implementation, as it
    already covers the functions in compiler-rt's atomic.c, leading to
    conflicts when linking.

    PR:             230888
    (cherry picked from commit 7c73d99e6cf7b69630856acac4a2ab82f5c9f218)

    Approved by:    so

 .../llvm-project/compiler-rt/lib/builtins/atomic.c |  4 ++--
 lib/libcompiler_rt/Makefile.inc                    | 25 +++++++++-------------
 2 files changed, 12 insertions(+), 17 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"

Reply via email to