mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mingw-cross-env-list] Re: src/qt-2-macosx-gcc-arch.patch


From: Tony Theodore
Subject: [Mingw-cross-env-list] Re: src/qt-2-macosx-gcc-arch.patch
Date: Sun, 17 Oct 2010 02:50:00 +1100

On 16 October 2010 01:10, Mark Brand <address@hidden> wrote:
>  Hi Tony,
>
> I was just wondering about src/qt-2-macosx-gcc-arch.patch which fixes the
> native build for macosx. Does this need to be submitted upstream or is it
> really very specific to our situation?

Hi Mark,

It's not really suitable for submission upstream as it's fairly
specific to our situation. The 64-bit build is explicitly disabled in
configure:6460

# but disable Cocoa if cross-building for mingw
[ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"

which then causes this error in src/corelib/global/qglobal.h:288

#if defined(Q_OS_MAC64) && !defined(QT_MAC_USE_COCOA) &&
!defined(QT_BUILD_QMAKE)
#error "You are building a 64-bit application, but using a 32-bit
version of Qt. Check your build configuration."
#endif

In case you're wondering, they use "Cocoa" to indicate 32/64-bit and
"Carbon" to indicate 32-bit only. I tried removing the check from
configure and the native build succeeds (cocoa is enabled by default),
however, the cross-build fails at various places due to conditions
like:

#ifdef QT_MAC_USE_COCOA

that need to be replaced with:

#if defined (Q_WS_MAC) && defined(QT_MAC_USE_COCOA)

I started working through these, but it looks like a long process
(though this would probably be worthwhile upstream).

The next thing I'll look at is trying to get QT_BUILD_QMAKE defined in
the carbon build - it's defined during configure, but not the main
build.

Calling gcc with -arch specified is the fail-safe (and least effort)
way to avoid this, though it's only a workaround.

Cheers,

Tony



reply via email to

[Prev in Thread] Current Thread [Next in Thread]