Skip to content

Commit 648d274

Browse files
committed
DaemonArchitecture: NUKE x86 revision detection
Always assume i686, instead of trying to use the numeric value of Q_PROCESSOR_X86, which isn't accurate in our build. For architecture detection the compiler is invoked without any of the flags that we usually pass. So the -march=XXX, etc. flags are not there. This means the architecture revision that the compiler advertises during architecture detection may not be the same as in the real build. You may react, "just do the architecture detection with all flags on", but this would probably lead to chicken-and-egg problems as architecture is used to choose flags. In principle it could be done with two passes of architecture detection but implementing that would obviously be a waste of time. Fixes #1596.
1 parent 4cfabd4 commit 648d274

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmake/DaemonArchitecture/DaemonArchitecture.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ platform variants we cannot support anyway. */
8080
#elif defined(Q_PROCESSOR_X86_64)
8181
#pragma message("DAEMON_ARCH_amd64")
8282

83-
#elif defined(Q_PROCESSOR_X86_32) && Q_PROCESSOR_X86 >= 6
83+
#elif defined(Q_PROCESSOR_X86_32)
84+
// Assume at least i686. Detecting older revisions would be unlikely to work here
85+
// because the revisions are likely configured by flags, but this file is "compiled"
86+
// without most command-line flags.
8487
#pragma message("DAEMON_ARCH_i686")
8588

8689
/* Devices like:

0 commit comments

Comments
 (0)