Open bmerry opened 1 year ago
For interest more than anything else: clang++ not detecting the resolver when it is static appears to be a bug: https://github.com/llvm/llvm-project/issues/54549
So if I understand correctly this is specifically a workaround for old versions of clang?
So if I understand correctly this is specifically a workaround for old versions of clang?
Based on testing with Compiler Explorer, it looks like it's still needed even for clang 17.0.1: https://gcc.godbolt.org/z/Eefn85d9b. Presumably a future release of clang will remove the need for this workaround.
So if I understand correctly this is specifically a workaround for old versions of clang?
Based on testing with Compiler Explorer, it looks like it's still needed even for clang 17.0.1: https://gcc.godbolt.org/z/Eefn85d9b. Presumably a future release of clang will remove the need for this workaround.
I've just had another look at this. It turns out the clang bug was fixed in clang 15 BUT if the resolver is static it has to be marked with __attribute__((used))
so that it doesn't get eliminated as unused before linking. So the code in meson doesn't work even for new versions of clang.
Describe the bug
compiler.has_function_attribute('ifunc')
is returning false on clang++ (e.g. with clang 14).To Reproduce
Output:
Relevant part of log:
It appears that clang++ doesn't like the resolver being declared static, even though clang (C compiler) is happy with it.
I will submit a PR to fix this.
Expected behavior The ifunc attribute should be detected as supported.
system parameters
meson --version
: 1.2.99 (git ae7a9b0)