diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-04-29 13:26:58 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-10 01:12:40 +0200 |
commit | 1b2d3be446df492c009bd575637a0f103241ce4d (patch) | |
tree | fafa5aa93c85f701ff33a291cd12493c93370af7 /configure | |
parent | 95fe97dbcb4a4ce81b80eaf7c45a1106dd860271 (diff) |
Sanitize QT_COMPILER_SUPPORTS_xxx in qcompilerdetection.h
... instead of scoping the defines in qconfig.h, which relied on the
Q_PROCESSOR_xxx defines and meant that we had to include qconfig.h
after qprocessordetection.h, which added a whole bunch of other
dependency issues.
We now let configure write QT_COMPILER_SUPPORTS_xxx to qconfig.h as
before, without any scoping, and then undefine the ones that don't
apply for the given processor. This means we need to include
qprocessordetection.h before qcompilerdetection.h in qglobal.h,
but the former does not depend on the latter, so this should be
fine.
Change-Id: If00c00d405463e9626fa0f7f5e6b17f68778904f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 28 |
1 files changed, 8 insertions, 20 deletions
@@ -6207,28 +6207,16 @@ fi # Add compiler sub-architecture support echo "" >>"$outpath/src/corelib/global/qconfig.h.new" echo "// Compiler sub-arch support" >>"$outpath/src/corelib/global/qconfig.h.new" -for SUBARCH in X86: SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 AVX AVX2 : \ - ARM: IWMMXT NEON : \ - MIPS: MIPS_DSP MIPS_DSPR2 : -do - line="" - case $SUBARCH in - :) - line="#endif" - ;; - *:) - line="#ifdef Q_PROCESSOR_$(echo $SUBARCH | sed 's/:$//')" - ;; - *) - eval "VAL=\$CFG_$SUBARCH" - case "$VAL" in - yes) - line=" #define QT_COMPILER_SUPPORTS_$SUBARCH" - ;; - esac +for SUBARCH in SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 AVX AVX2 \ + IWMMXT NEON \ + MIPS_DSP MIPS_DSPR2; do + eval "VAL=\$CFG_$SUBARCH" + case "$VAL" in + yes) + echo "#define QT_COMPILER_SUPPORTS_$SUBARCH" \ + >>"$outpath/src/corelib/global/qconfig.h.new" ;; esac - [ -n "$line" ] && echo "$line" >>"$outpath/src/corelib/global/qconfig.h.new" done echo "" >>"$outpath/src/corelib/global/qconfig.h.new" |