From 1b2d3be446df492c009bd575637a0f103241ce4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 29 Apr 2013 13:26:58 +0200 Subject: 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 --- configure | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 295644ce45..e6b92f1610 100755 --- a/configure +++ b/configure @@ -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" -- cgit v1.2.3