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

Tom Stellard via All-commits all-commits at lists.llvm.org
Tue Feb 22 22:18:06 PST 2022


  Branch: refs/heads/release/14.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 2fe5bf57172cebf5a3f0b3f82552cf5c2122eca2
      https://github.com/llvm/llvm-project/commit/2fe5bf57172cebf5a3f0b3f82552cf5c2122eca2
  Author: Rainer Orth <ro at gcc.gnu.org>
  Date:   2022-02-22 (Tue, 22 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

(cherry picked from commit a6afa9e6b0d9a08ecc878e62343a2af80ff30435)




More information about the All-commits mailing list