PDA

View Full Version : How to remove QT_HAVE_SSE2 definition from compiler comand line?



oficjalne100
13th December 2013, 18:21
Hello
Now I have compiler cals like this:

g++ -c -pipe -g -frtti -fexceptions -mthreads -Wall -Wextra -DUNICODE -DQT_LARGEFILE_SUPPORT -DDEBUG -DDEBUGNOCOMPILE -DQT_DLL -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\x-unix\Qt4.8.4\include\QtCore" -I"..\..\x-unix\Qt4.8.4\include\QtGui" -I"..\..\x-unix\Qt4.8.4\include\QtWebKit" -I"..\..\x-unix\Qt4.8.4\include" -I"..\lib\ToolsString" -I"..\lib\ToolsFile" -I"..\lib\Tools" -I"..\lib\Errors" -I"..\..\x-unix\Qt4.8.4\include\ActiveQt" -I"debug" -I"." -I"..\interdict" -I"." -I"..\..\x-unix\Qt4.8.4\mkspecs\win32-g++" -o debug\main.o ..\interdict\main.cpp


And I am concern about -DQT_HAVE_SSE2 because my processor does not support such instructions. So I added to my pro file this line:
DEFINES -= QT_HAVE_SSE2
But it does not help.

So my question is: How to remove -DQT_HAVE_SSE2 compiler flag?

thanks
Jacek

oficjalne100
15th December 2013, 15:53
Maybe I explain that mentioned compiler cals I have in Qt Creator from make files generated by qmake from my pro file.

ChrisW67
17th December 2013, 22:50
You can try:


CONFIG -= sse2

in your PRO file: qmake Variables: CONFIG
Alternatively configure and build your own Qt library with "--no-sse2"

wysota
17th December 2013, 23:53
As far as I understand it, if Qt is built with those flags then it means support for them was advertised when Qt was built. Furthermore it is likely SSE2/3DNow support in Qt is just optional -- if Qt detects a CPU with such features, it will use optimized code. I wouldn't worry about it unless you verified all your applications crash on illegal instructions.

oficjalne100
19th December 2013, 18:57
As far as I understand it, if Qt is built with those flags then it means support for them was advertised when Qt was built. Furthermore it is likely SSE2/3DNow support in Qt is just optional -- if Qt detects a CPU with such features, it will use optimized code. I wouldn't worry about it unless you verified all your applications crash on illegal instructions.

I compile Qt 4.8.4 without SSE2 support but qmake uses it wihtout care about Qt library configure flags. And as far as I know Qt5 configure has not SSE2 disable option.