forked from qt-creator/qt-creator
Qbs: Un-break support for Itanium and PowerPC.
Appending _64 to the arch name for 64-bit ABIs is insufficient, and this is now properly handled for all architectures currently recognized by Qbs, and hopefully future-proofed as well. Change-Id: I56fcfdcfd065ed5231fed3a817a55b9af9c82fc9 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
This commit is contained in:
@@ -37,6 +37,8 @@
|
|||||||
#include <qtsupport/qtkitinformation.h>
|
#include <qtsupport/qtkitinformation.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
|
#include <tools/hostosinfo.h>
|
||||||
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
|
||||||
namespace QbsProjectManager {
|
namespace QbsProjectManager {
|
||||||
@@ -65,10 +67,29 @@ QVariantMap DefaultPropertyProvider::properties(const ProjectExplorer::Kit *k, c
|
|||||||
if (tc) {
|
if (tc) {
|
||||||
// FIXME/CLARIFY: How to pass the sysroot?
|
// FIXME/CLARIFY: How to pass the sysroot?
|
||||||
ProjectExplorer::Abi targetAbi = tc->targetAbi();
|
ProjectExplorer::Abi targetAbi = tc->targetAbi();
|
||||||
QString architecture = ProjectExplorer::Abi::toString(targetAbi.architecture());
|
if (targetAbi.architecture() != ProjectExplorer::Abi::UnknownArchitecture) {
|
||||||
if (targetAbi.wordWidth() == 64)
|
QString architecture = ProjectExplorer::Abi::toString(targetAbi.architecture());
|
||||||
architecture.append(QLatin1String("_64"));
|
|
||||||
data.insert(QLatin1String(QBS_ARCHITECTURE), architecture);
|
// We have to be conservative tacking on suffixes to arch names because an arch that is
|
||||||
|
// already 64-bit may get an incorrect name as a result (i.e. Itanium)
|
||||||
|
if (targetAbi.wordWidth() == 64) {
|
||||||
|
switch (targetAbi.architecture()) {
|
||||||
|
case ProjectExplorer::Abi::X86Architecture:
|
||||||
|
architecture.append(QLatin1String("_"));
|
||||||
|
// fall through
|
||||||
|
case ProjectExplorer::Abi::ArmArchitecture:
|
||||||
|
case ProjectExplorer::Abi::MipsArchitecture:
|
||||||
|
case ProjectExplorer::Abi::PowerPCArchitecture:
|
||||||
|
architecture.append(QString::number(targetAbi.wordWidth()));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
data.insert(QLatin1String(QBS_ARCHITECTURE),
|
||||||
|
qbs::Internal::HostOsInfo::canonicalArchitecture(architecture));
|
||||||
|
}
|
||||||
|
|
||||||
if (targetAbi.endianness() == ProjectExplorer::Abi::BigEndian)
|
if (targetAbi.endianness() == ProjectExplorer::Abi::BigEndian)
|
||||||
data.insert(QLatin1String(QBS_ENDIANNESS), QLatin1String("big"));
|
data.insert(QLatin1String(QBS_ENDIANNESS), QLatin1String("big"));
|
||||||
|
Reference in New Issue
Block a user