Function multi-versioning: disable ifunc for ELF targets other than glibc/Android...
authorFangrui Song <i@maskray.me>
Mon, 14 Aug 2023 15:59:59 +0000 (08:59 -0700)
committerTobias Hieta <tobias@hieta.se>
Wed, 30 Aug 2023 15:00:27 +0000 (17:00 +0200)
commit9afe6676833dc0a554463f82e8d5574a0987aa1e
treee0b1633f9d7aa3559b1bcaa5df74c76bc47c32b8
parentb6cf21feeead70805ecd1231827777492034afea
Function multi-versioning: disable ifunc for ELF targets other than glibc/Android/FreeBSD

Generalize D127933 (Fuchsia special case) to other ELF targets. Ensure
that musl, NetBSD, OpenBSD, etc do not get ifunc codegen which is
unsupported in their rtld.

Link: https://discourse.llvm.org/t/does-ifunc-use-from-llvm-require-os-support/67628
Close: https://github.com/llvm/llvm-project/issues/64631
(cherry picked from commit 0c3a02b8c09bb408a74a638a263e51d67c92ca74)
clang/include/clang/Basic/TargetInfo.h
clang/test/CodeGen/attr-target-mv-va-args.c
clang/test/CodeGen/unique-internal-linkage-names.cpp