1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-19 08:13:21 +00:00

Backport an upstream commit that fixes the build with libc++ 3.9.0.

Ever since LLVM 3.9.0 was imported into base, qbs was failing to build with an
error message like this:

In file included from /wrkdirs/usr/ports/devel/qbs/work/qbs-src-1.6.1/src/lib/corelib/api/internaljobs.cpp:39:
In file included from /wrkdirs/usr/ports/devel/qbs/work/qbs-src-1.6.1/src/lib/corelib/buildgraph/executor.h:45:
/usr/include/c++/v1/queue:400:5: error: static_assert failed ""
    static_assert((is_same<_Tp, value_type>::value), "" );
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/devel/qbs/work/qbs-src-1.6.1/src/lib/corelib/buildgraph/executor.h:156:12: note: in instantiation of template class 'std::__1::priority_queue<qbs::Internal::Artifact *, std::__1::vector<qbs::Internal::BuildGraphNode *, std::__1::allocator<qbs::Internal::BuildGraphNode *> >, qbs::Internal::Executor::ComparePriority>' requested here
    Leaves m_leaves;

I don't think PORTREVISION needs to be bumped, as there shouldn't be any
difference on systems where the port was already building fine.

MFH:		2016Q4
This commit is contained in:
Raphael Kubo da Costa 2016-11-29 16:10:00 +00:00
parent 9950e1efee
commit 391faaf005
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=427385

View File

@ -0,0 +1,36 @@
This fixes a build failure with libc++ 3.9.0 (FreeBSD 12+):
In file included from /wrkdirs/usr/ports/devel/qbs/work/qbs-src-1.6.1/src/lib/corelib/api/internaljobs.cpp:39:
In file included from /wrkdirs/usr/ports/devel/qbs/work/qbs-src-1.6.1/src/lib/corelib/buildgraph/executor.h:45:
/usr/include/c++/v1/queue:400:5: error: static_assert failed ""
static_assert((is_same<_Tp, value_type>::value), "" );
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/devel/qbs/work/qbs-src-1.6.1/src/lib/corelib/buildgraph/executor.h:156:12: note: in instantiation of template class 'std::__1::priority_queue<qbs::Internal::Artifact *, std::__1::vector<qbs::Internal::BuildGraphNode *, std::__1::allocator<qbs::Internal::BuildGraphNode *> >, qbs::Internal::Executor::ComparePriority>' requested here
Leaves m_leaves;
commit 5c1183aa377ae8de487d5541360369ebd2ee0f6b
Author: Christian Kandeler <christian.kandeler@qt.io>
Date: Mon Nov 28 14:54:43 2016 +0100
Executor: Fix undefined behavior
C++17 introduces new requirements on the template parameters of
std::priority_queue.
Task-number: QBS-1051
Change-Id: I9a22b8f2d3c1f0bd532b0a76f5d2a16bebc303f7
Reviewed-by: Raphael Kubo da Costa <rakuco@FreeBSD.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
--- src/lib/corelib/buildgraph/executor.h
+++ src/lib/corelib/buildgraph/executor.h
@@ -107,7 +107,8 @@ private:
bool operator() (const BuildGraphNode *x, const BuildGraphNode *y) const;
};
- typedef std::priority_queue<Artifact *, std::vector<BuildGraphNode *>, ComparePriority> Leaves;
+ typedef std::priority_queue<BuildGraphNode *, std::vector<BuildGraphNode *>,
+ ComparePriority> Leaves;
void doBuild();
void prepareAllNodes();