https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125197

--- Comment #17 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> And the issue is that the -m32 multilib of libstdc++.so has undefined
> references to symbols like __atomic_sub_fetch_4, which means it depends on
> libatomic.so, but the 32-bit libatomic.so assumes it's built for sparcv9. So
> libstdc++.so is built to work on older hardware by using libatomic.so
> instead of native v9 instructions, but libatomic.so doesn't actually work on
> older hardware.

Why is the atomic_flags setting apparently not respected in libstdc++.so?

# Set specific CPU overrides for atomic_word_dir and atomic_flags. 
# Most can just use generic.
# THIS TABLE IS SORTED.  KEEP IT THAT WAY.
case "${host_cpu}" in
  cris*)
    atomic_word_dir=cpu/cris
    ;;
  i[4567]86 | x86_64)
    atomic_flags="-march=native"
    ;;
  sparc* | ultrasparc)
    atomic_word_dir=cpu/sparc
    atomic_flags="-mcpu=v9"
    ;;
esac

Reply via email to