Don't include sys/auxv.h if HAVE_STRONG_GETAUXVAL is not defined to avoid a build failure on uclibc
Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com
Don't include sys/auxv.h if HAVE_STRONG_GETAUXVAL is not defined to avoid a build failure on uclibc
Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com
Don't include sys/auxv.h if HAVE_STRONG_GETAUXVAL is not defined to
avoid a build failure on uclibc
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
This was added by you to fix a build failure on uclibc in 330cb33985d0ce97c20f4a0f0bbda0fbffe098d4
I know, I replaced #ifdef __linux__ by #if defined(HAVE_STRONG_GETAUXVAL) || defined(HAVE_WEAK_GETAUXVAL) but defined(HAVE_WEAK_GETAUXVAL) should be removed as uclibc-ng don't have sys/auxv.h. I didn't notice this mistake until now because there was no build failure. However, the build fails now that those symbols are correctly defined in configure by https://github.com/bitcoin/bitcoin/commit/41a413b31746cc749f3c64ed8070cea9cc6cfdbe.
I wonder if it's time to get rid of HAVE_WEAK_GETAUXVAL. I think it's confusing. Either we build against a C library that has this functionality, or not. We don't do this weak linking thing for any other symbols and recently got rid of the other glibc backwards compatibility stuff.
Unless there is still a current platform that really needs it (Android?), I'd prefer to remove it from the build system, it has caused enough issues.
Unless there is still a current platform that really needs it (Android?), I'd prefer to remove it from the build system, it has caused enough issues.
Had a look at this. The Android NDK docs claim that you can use getauxval() beginning with API level 18 and later. However the docs in crc32c_arm64_check.h claim:
https://github.com/bitcoin/bitcoin/blob/86c3b84388813c9d6cab6031bc36d87a8a169fee/src/crc32c/src/crc32c_arm64_check.h#L23
Although, both of those may be irrelevant, given we are moving to using std::filesystem. Support for that only landed in NDK 22, so we should be able to assume getauxval() availability?
Although, both of those may be irrelevant, given we are moving to using std::filesystem. Support for that only landed in NDK 22, so we should be able to assume getauxval() availability?
Thanks for checking! Yes, that makes sense.
I'm going to close this in favour of #23082. @ffontaine can you test that PR against uclibc-ng?