summaryrefslogtreecommitdiff
path: root/dev-db/sqlite/files/sqlite-3.47.2-hwtime.h-Don-t-use-rdtsc-on-i486.patch
AgeCommit message (Collapse)Author
2025-01-25dev-db/sqlite: add upstream bug reference wrt rdtscSam James
Bug: https://bugs.gentoo.org/948671 Signed-off-by: Sam James <sam@gentoo.org>
2025-01-25dev-db/sqlite: Don't use rdtsc on i486Sam James
If -DSQLITE_ENABLE_STMT_SCANSTATUS is passed, rdtsc is used for profiling purposes, but that's not available on i486 CPUs (e.g. Soekris 4501 / AMD Elan in the linked bug). Just look for i586 instead of i386. For the i386/i486 case, it's fine if we use the stub implementation. This feels cleaner than toggling functionality in the ebuild, even if it's unlikely anyone on i486 is going to use that. Thanks to amonakov who found the problem quickly and the relevant part of SQLite. SQLITE_ENABLE_STMT_SCANSTATUS was first enabled with 6d8922b1541e86d62546808b1edca6fe422fc560 (grafted from migration), but I suspect the reason nobody noticed this before is (apart from i486 being rare) that only fairly recent gnupg-2.4.x starts to use SQLite (and we default-enable USE=tofu in-line with some upstream reocmmendations). Bug: https://bugs.gentoo.org/948671 Signed-off-by: Sam James <sam@gentoo.org>