From 26a7c530090e98d7f30d300e06dc87bca02c8a30 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 1 May 2021 08:58:45 -0700 Subject: QHash: disable the AES based one on the bootstrap library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bootstrap library doesn't need it. All bootstrapped tools are expected to produce deterministic output, given the enforced seed of 0: #ifdef QT_BOOTSTRAPPED // the seed is always 0 in bootstrapped mode (no seed generation code), // so help the compiler do dead code elimination seed = 0; #endif Change-Id: I755911ae7d0341f49039fffd167afc934ff1c9e1 Reviewed-by: Tor Arne Vestbø --- src/corelib/tools/qhash.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/tools/qhash.cpp') diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 187839ca08..2221de1461 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -527,7 +527,7 @@ lt16: } #endif -#if defined(__ARM_FEATURE_CRYPTO) +#if defined(__ARM_FEATURE_CRYPTO) && !defined(QT_BOOTSTRAPPED) static size_t aeshash(const uchar *p, size_t len, size_t seed) noexcept { uint8x16_t key; @@ -669,7 +669,7 @@ size_t qHashBits(const void *p, size_t size, size_t seed) noexcept #ifdef AESHASH if (seed && qCpuHasFeature(AES) && qCpuHasFeature(SSE4_2)) return aeshash(reinterpret_cast(p), size, seed); -#elif defined(__ARM_FEATURE_CRYPTO) +#elif defined(__ARM_FEATURE_CRYPTO) && !defined(QT_BOOTSTRAPPED) // Do additional runtime check as Yocto hard enables Crypto extension for // all armv8 configs if (seed && (qCpuFeatures() & CpuFeatureAES)) -- cgit v1.2.3