Skip to content
Permalink
Browse files

qmake5-1.0.tcl: avoid mixing libc++ and libstdc++

  • Loading branch information
MarcusCalhoun-Lopez committed Dec 28, 2016
1 parent 15fc753 commit 77ec1368e330ec3d24f85c5543cd0c5304137fdf
Showing with 27 additions and 12 deletions.
  1. +27 −12 _resources/port1.0/group/qmake5-1.0.tcl
@@ -92,18 +92,33 @@ if { ${configure.compiler} ne "clang" } {
QMAKE_CXX=${configure.cxx}
}

# override C++11 flags set in ${prefix}/libexec/qt5/mkspecs/common/clang-mac.conf
# so value of ${configure.cxx_stdlib} can always be used
configure.args-append \
QMAKE_CXXFLAGS_CXX11-=-stdlib=libc++ \
QMAKE_LFLAGS_CXX11-=-stdlib=libc++ \
QMAKE_CXXFLAGS_CXX11+=-stdlib=${configure.cxx_stdlib} \
QMAKE_LFLAGS_CXX11+=-stdlib=${configure.cxx_stdlib}

# ensure ${configure.cxx_stdlib} is used for C++ stdlib
configure.args-append \
QMAKE_CXXFLAGS+=-stdlib=${configure.cxx_stdlib} \
QMAKE_LFLAGS+=-stdlib=${configure.cxx_stdlib}
if { ${qt_name} eq "qt55" } {

# always use the same standard library
configure.args-append \
QMAKE_CXXFLAGS+=-stdlib=${configure.cxx_stdlib} \
QMAKE_LFLAGS+=-stdlib=${configure.cxx_stdlib}

# override C++ flags set in ${prefix}/libexec/qt5/mkspecs/common/clang-mac.conf
# so value of ${configure.cxx_stdlib} can always be used
if { ${configure.cxx_stdlib} ne "libc++" } {
configure.args-append \
QMAKE_CXXFLAGS_CXX11-=-stdlib=libc++ \
QMAKE_LFLAGS_CXX11-=-stdlib=libc++ \
QMAKE_CXXFLAGS_CXX11+=-stdlib=${configure.cxx_stdlib} \
QMAKE_LFLAGS_CXX11+=-stdlib=${configure.cxx_stdlib}
}
} else {
if { ${configure.cxx_stdlib} ne "libc++" } {
# override C++ flags set in ${prefix}/libexec/qt5/mkspecs/common/clang-mac.conf
# so value of ${configure.cxx_stdlib} can always be used
configure.args-append \
QMAKE_CXXFLAGS-=-stdlib=libc++ \
QMAKE_LFLAGS-=-stdlib=libc++ \
QMAKE_CXXFLAGS+=-stdlib=${configure.cxx_stdlib} \
QMAKE_LFLAGS+=-stdlib=${configure.cxx_stdlib}
}
}

if {![info exists qt5_qmake_request_no_debug]} {
variant debug description {Build both release and debug libraries} {}

0 comments on commit 77ec136

Please sign in to comment.
You can’t perform that action at this time.