[all-commits] [llvm/llvm-project] a6afa9: [Driver] Use libatomic for 32-bit SPARC atomics su...

rorth via All-commits all-commits at lists.llvm.org
Thu Feb 10 03:41:02 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a6afa9e6b0d9a08ecc878e62343a2af80ff30435
      https://github.com/llvm/llvm-project/commit/a6afa9e6b0d9a08ecc878e62343a2af80ff30435
  Author: Rainer Orth <ro at gcc.gnu.org>
  Date:   2022-02-10 (Thu, 10 Feb 2022)

  Changed paths:
    M clang/lib/Driver/ToolChains/CommonArgs.cpp
    M clang/lib/Driver/ToolChains/CommonArgs.h
    M clang/lib/Driver/ToolChains/Solaris.cpp
    M clang/test/Driver/solaris-ld.c

  Log Message:
  -----------
  [Driver] Use libatomic for 32-bit SPARC atomics support

Even after D86621 <https://reviews.llvm.org/D86621>, `clang -m32` on
Solaris/sparcv9 doesn't inline atomics with 8-byte operands, unlike `gcc`.
This leads to many link failures in the testsuite (undefined references to
`__atomic_load_8` and `__sync_val_compare_and_swap_8`.  Until a proper
codegen fix can be implemented, this patch works around the first of those
by linking with `-latomic`.

Tested on `sparcv9-sun-solaris2.11`.

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




More information about the All-commits mailing list