diff options
author | Morten Sorvig <morten.sorvig@nokia.com> | 2010-02-01 09:07:59 +0100 |
---|---|---|
committer | Morten Sorvig <morten.sorvig@nokia.com> | 2010-02-01 09:07:59 +0100 |
commit | ead3fba59d0c89130ddaca8e3ef49e26e11ee79c (patch) | |
tree | 12261439d5c34873e1123863771224963eada634 | |
parent | 73e6984b7835b4fa7bc526499d6917fcddadb1d1 (diff) |
Re-enable optimied builds (-O2)
Disable SSE use and compile qdrawhelper.cpp
in debug mode to work around crases in the
memfill code.
-rw-r--r-- | mkspecs/qws/linux-nacl-g++/qmake.conf | 2 | ||||
-rw-r--r-- | mkspecs/qws/macx-nacl-g++/qmake.conf | 2 | ||||
-rw-r--r-- | src/gui/painting/painting.pri | 18 | ||||
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 5 |
4 files changed, 22 insertions, 5 deletions
diff --git a/mkspecs/qws/linux-nacl-g++/qmake.conf b/mkspecs/qws/linux-nacl-g++/qmake.conf index 2389ad9c84..089238dddf 100644 --- a/mkspecs/qws/linux-nacl-g++/qmake.conf +++ b/mkspecs/qws/linux-nacl-g++/qmake.conf @@ -20,7 +20,7 @@ QMAKE_CFLAGS += -pipe QMAKE_CFLAGS_DEPS += -M QMAKE_CFLAGS_WARN_ON += -Wall -W QMAKE_CFLAGS_WARN_OFF += -w -QMAKE_CFLAGS_RELEASE += +QMAKE_CFLAGS_RELEASE += -O2 QMAKE_CFLAGS_DEBUG += -g QMAKE_CFLAGS_SHLIB += -fPIC #QMAKE_CFLAGS_STATIC_LIB += -fPIC diff --git a/mkspecs/qws/macx-nacl-g++/qmake.conf b/mkspecs/qws/macx-nacl-g++/qmake.conf index a711f30b6e..5e2f0592d0 100644 --- a/mkspecs/qws/macx-nacl-g++/qmake.conf +++ b/mkspecs/qws/macx-nacl-g++/qmake.conf @@ -24,7 +24,7 @@ QMAKE_YACCFLAGS = -d QMAKE_CFLAGS = -pipe QMAKE_CFLAGS_WARN_ON = -Wall -W QMAKE_CFLAGS_WARN_OFF = -QMAKE_CFLAGS_RELEASE = -fno-default-inline +QMAKE_CFLAGS_RELEASE = -O2 -fno-default-inline QMAKE_CFLAGS_DEBUG = -g QMAKE_CFLAGS_SHLIB = -fPIC QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri index 69c7fd9d30..e62b3ca820 100644 --- a/src/gui/painting/painting.pri +++ b/src/gui/painting/painting.pri @@ -87,7 +87,6 @@ SOURCES += \ SOURCES += \ painting/qpaintengine_raster.cpp \ - painting/qdrawhelper.cpp \ painting/qimagescale.cpp \ painting/qgrayraster.c @@ -96,6 +95,23 @@ SOURCES += \ painting/qrasterdefs_p.h \ painting/qgrayraster_p.h + + nacl { + NONOPTIMIZING_SOURCES += painting/qdrawhelper.cpp + + nonoptimizing_compiler.commands = $$QMAKE_CXX -c -Winline + nonoptimizing_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} + nonoptimizing_compiler.dependency_type = TYPE_C + nonoptimizing_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} + nonoptimizing_compiler.input = NONOPTIMIZING_SOURCES + nonoptimizing_compiler.variable_out = OBJECTS + nonoptimizing_compiler.name = compiling[nonoptimizing] ${QMAKE_FILE_IN} + silent:nonoptimizing_compiler.commands = @echo compiling[mmx] ${QMAKE_FILE_IN} && $$ nonoptimizing_compiler.commands + QMAKE_EXTRA_COMPILERS += nonoptimizing_compiler + } else { + SOURCES += painting/qdrawhelper.cpp + } + win32 { HEADERS += painting/qprintengine_win_p.h diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index b6286b3e19..1225019bb4 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -7732,8 +7732,9 @@ static uint detectCPUFeatures() { #if defined Q_OS_NACL // The inline assembler uses the pushf instruction, which is illigal. - // ##NACL## Cheat and assume a modern CPU. - return MMX|SSE|SSE2|CMOV; + // ##NACL## Disabled for now, the qdrawhelper code was crashing with + // SSE enabled. Figure out why it crashes before enabling. + return 0; #elif defined (Q_OS_WINCE) #if defined (ARM) if (IsProcessorFeaturePresent(PF_ARM_INTEL_WMMX)) |