[kde-freebsd] Fixing devel/qt4-corelib to build with clang

Raphael Kubo da Costa rakuco at FreeBSD.org
Wed May 8 11:18:26 UTC 2013


Dimitry Andric <dimitry at andric.com> writes:

> However, for 3DNow intrinsics, the header has something different:
>
>   #if defined(QT_HAVE_3DNOW)
>   #include <mm3dnow.h>
>   #endif
>
> As you can see, there is no test whether the compiler defines __3dNOW__,
> so if the configuration stage enables QT_HAVE_3DNOW (as it does for
> clang, but not for gcc), it always includes <mm3dnow.h>, even if the
> compiler's current mode does not support it.  This is a bug in Qt.
>
> So I changed this part to the following (similar to the other intrinsics
> includes):
>
>   #if defined(QT_HAVE_3DNOW) && (defined(__3dNOW__) || defined(Q_CC_MSVC))
>   #include <mm3dnow.h>
>   #endif

This still looks weird to me: QT_HAVE_3DNOW should only be defined if
the test in config.tests/unix/3dnow/3dnow.cpp passes. It's supposed to
fail to build with clang-i486 just like qsimd.cpp.

The way we build each Qt component separately may make the build system
confused.

I'm at $WORK right now, and ref10-i386 lacks some of the Qt dependencies
for me to perform some tests, so can you check if devel/qmake4 and
devel/qt4-corelib have a .qmake.cache file in their work dir that end up
with "3dnow" somewhere in their "CONFIG +=" line?


More information about the kde-freebsd mailing list