Unlike clang or Solaris Studio, gcc does not enable 64-bit atomic
operations on 32-bit SPARC even when using the V9 baseline. This
causes the compiler-rt library failing to build with gcc when
targeting 32-bit SPARC.
Passing "-mcpu=ultrasparc3" to the compiler raises the baseline to
V8+ which enables 64-bit atomic operations on 32-bit SPARC, thus
allowing the compiler-rt library to be built successfully with gcc
during the stage1 build.
Why do you need to (CMAKE_SIZEOF_VOID_P EQUAL 4)?
Let test_target_arch pick appropriate one?
Which target does not build without the patch?