Fix build: disable the HWRNG in bootstrapped mode

qmake build fails:
qrandom.o: in function `QRandomGenerator::SystemGenerator::generate(unsigned int*, unsigned int*)':
/home/tjmaciei/src/qt/qt5/qtbase/src/corelib/global/qrandom.cpp:333: undefined reference to `qRandomCpu(void*, long long)'

Fixes: QTBUG-78937
Change-Id: Ib5d667bf77a740c28d2efffd15cb4236f765917c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 4f88e0bbd1c014adc6db7a37e4754446c4c8f529)
This commit is contained in:
Thiago Macieira 2019-10-06 21:14:58 -07:00
parent 44879f8cde
commit 67a9c600ad

View File

@ -346,7 +346,7 @@ extern Q_CORE_EXPORT QBasicAtomicInteger<unsigned> qt_cpu_features[2];
#endif
Q_CORE_EXPORT void qDetectCpuFeatures();
#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND)
#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND) && !defined(QT_BOOTSTRAPPED)
Q_CORE_EXPORT qsizetype qRandomCpu(void *, qsizetype) Q_DECL_NOTHROW;
#else
static inline qsizetype qRandomCpu(void *, qsizetype) Q_DECL_NOTHROW