From 77196b9dc3caa7dda1072a64ed953bf7231b1af3 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 14 Jun 2013 20:02:56 +0200 Subject: [PATCH] correctly fix compilation of NEON_ASM sources This reverts commit 1ef74a763a726829bfc26224d82acff207fdc8bb, as assembler files in SOURCES break compiling with -pch, as we don't create a respective PCH. instead, compile assembler code with QMAKE_CC, not QMAKE_CXX. the reason why this change is needed in the first place is not clear to me, but i guess that CXX defines some c++-related macros when preprocessing the file, which breaks further down the line. this is counter-intuitive, as the g++ frontend should treat the same sources the same way as the gcc frontend (differences should be limited the the ld invocation). Task-number: QTBUG-29765 Change-Id: Ic0116b3a5fa621f12ac41cadf3062ff00b538e85 Reviewed-by: Rafael Roquetto Reviewed-by: Joerg Bornemann Reviewed-by: Thiago Macieira --- mkspecs/features/simd.prf | 40 +++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/mkspecs/features/simd.prf b/mkspecs/features/simd.prf index b430e59ff0..14da926dc3 100644 --- a/mkspecs/features/simd.prf +++ b/mkspecs/features/simd.prf @@ -116,7 +116,6 @@ load(qt_build_config) } neon { HEADERS += $$NEON_HEADERS - SOURCES += $$NEON_ASM neon_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS) !contains(QT_CPU_FEATURES, neon):neon_compiler.commands += $$QMAKE_CFLAGS_NEON @@ -127,7 +126,16 @@ load(qt_build_config) neon_compiler.variable_out = OBJECTS neon_compiler.name = compiling[neon] ${QMAKE_FILE_IN} silent:neon_compiler.commands = @echo compiling[neon] ${QMAKE_FILE_IN} && $$neon_compiler.commands - QMAKE_EXTRA_COMPILERS += neon_compiler + neon_assembler.commands = $$QMAKE_CC -c $(CFLAGS) + !contains(QT_CPU_FEATURES, neon):neon_assembler.commands += $$QMAKE_CFLAGS_NEON + neon_assembler.commands += $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} + neon_assembler.dependency_type = TYPE_C + neon_assembler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} + neon_assembler.input = NEON_ASM + neon_assembler.variable_out = OBJECTS + neon_assembler.name = assembling[neon] ${QMAKE_FILE_IN} + silent:neon_assembler.commands = @echo assembling[neon] ${QMAKE_FILE_IN} && $$neon_assembler.commands + QMAKE_EXTRA_COMPILERS += neon_compiler neon_assembler } iwmmxt { HEADERS += $$IWMMXT_HEADERS @@ -150,24 +158,32 @@ load(qt_build_config) mips_dsp_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} mips_dsp_compiler.dependency_type = TYPE_C mips_dsp_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} - mips_dsp_compiler.input = MIPS_DSP_ASM MIPS_DSP_SOURCES + mips_dsp_compiler.input = MIPS_DSP_SOURCES mips_dsp_compiler.variable_out = OBJECTS mips_dsp_compiler.name = compiling[mips_dsp] ${QMAKE_FILE_IN} silent:mips_dsp_compiler.commands = @echo compiling[mips_dsp] ${QMAKE_FILE_IN} && $$mips_dsp_compiler.commands + mips_dsp_assembler.commands = $$QMAKE_CC -c + mips_dsp_assembler.commands += $(CFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} + mips_dsp_assembler.dependency_type = TYPE_C + mips_dsp_assembler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} + mips_dsp_assembler.input = MIPS_DSP_ASM + mips_dsp_assembler.variable_out = OBJECTS + mips_dsp_assembler.name = assembling[mips_dsp] ${QMAKE_FILE_IN} + silent:mips_dsp_assembler.commands = @echo assembling[mips_dsp] ${QMAKE_FILE_IN} && $$mips_dsp_assembler.commands QMAKE_EXTRA_COMPILERS += mips_dsp_compiler } mips_dspr2 { HEADERS += $$MIPS_DSP_HEADERS - mips_dspr2_compiler.commands = $$QMAKE_CXX -c - mips_dspr2_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} - mips_dspr2_compiler.dependency_type = TYPE_C - mips_dspr2_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} - mips_dspr2_compiler.input = MIPS_DSPR2_ASM - mips_dspr2_compiler.variable_out = OBJECTS - mips_dspr2_compiler.name = compiling[mips_dspr2] ${QMAKE_FILE_IN} - silent:mips_dspr2_compiler.commands = @echo compiling[mips_dspr2] ${QMAKE_FILE_IN} && $$mips_dspr2_compiler.commands - QMAKE_EXTRA_COMPILERS += mips_dspr2_compiler + mips_dspr2_assembler.commands = $$QMAKE_CC -c + mips_dspr2_assembler.commands += $(CFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} + mips_dspr2_assembler.dependency_type = TYPE_C + mips_dspr2_assembler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} + mips_dspr2_assembler.input = MIPS_DSPR2_ASM + mips_dspr2_assembler.variable_out = OBJECTS + mips_dspr2_assembler.name = assembling[mips_dspr2] ${QMAKE_FILE_IN} + silent:mips_dspr2_assembler.commands = @echo assembling[mips_dspr2] ${QMAKE_FILE_IN} && $$mips_dspr2_assembler.commands + QMAKE_EXTRA_COMPILERS += mips_dspr2_assembler } } else:win32-msvc* { sse2 {