[Buildroot] [PATCH] pacakge/qt5/qt5base: fix build with ccache

Benoît Thébaudeau benoit at wsystem.com
Thu Aug 27 08:12:44 UTC 2015


Hi Thomas,

On 27/08/2015 00:10, Benoît Thébaudeau wrote:
> On Wed, Aug 26, 2015 at 3:45 PM, Thomas Petazzoni
> <thomas.petazzoni at free-electrons.com> wrote:
>> On Tue, 25 Aug 2015 12:41:38 +0200, Benoît Thébaudeau wrote:
>>> +-    # Check if QMAKE_CXX points to an executable.
>>> +-    ensurePathEnv()
>>> +-    for (dir, QMAKE_PATH_ENV) {
>>> +-        exists($$dir/$${QMAKE_CXX}$$sfx): \
>>> +-            return()
>>> +-    }
>>
>> Instead of removing this entire piece of code, can you try to replace
>> just this last part by something like:
>>
>>         system($${QMAKE_CXX}$$sfx --version): return()
>>
>> Instead of trying to look for a file, it will actually try to run the
>> compiler.
>>
>> Also, can you report the bug and submit the patch upstream to Qt? See
>> https://bugreports.qt.io/secure/Dashboard.jspa.
> 
> I have opened a bug report upstream as you suggested:
> https://bugreports.qt.io/browse/QTBUG-47951
> 
> As explained in this report, I think that your suggestion would work
> for Buildroot (not yet tested), but not for upstream Qt.
> 
> My point with this patch was that upstream could consider this
> Buildroot use case as illegal because the definition of QMAKE_CXX
> (http://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-cxx) only
> mentions a filename and a path as possibilities. In that case, the bug
> is in Buildroot, and since this sanity check of the compiler is not
> needed for Buildroot, we can just remove this test. If we don't want a
> local patch for this, maybe we could use a wrapper above ccache, or
> put ccache into QMAKE_CXX and the compiler into QMAKE_CXXFLAGS (not
> tested, and a bit ugly).
> 
> Wait and see what upstream says.

Upstream recommends this approach:
http://lists.qt-project.org/pipermail/qt-creator/2014-January/003148.html

What do you think?

Best regards,
Benoît


More information about the buildroot mailing list