зеркало из https://github.com/microsoft/vcpkg.git
[vcpkg,boost-modular-build-helper] initial ppc64le community support (#15572)
* [vcpkg] initial ppc64le community support Signed-off-by: Andrei Lebedev <lebdron@gmail.com> * [boost-modular-build-helper] ppc64le support Signed-off-by: Andrei Lebedev <lebdron@gmail.com> * Merge from master Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com> Co-authored-by: dan-shaw <51385773+dan-shaw@users.noreply.github.com> Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
This commit is contained in:
Родитель
34a9432e2b
Коммит
83b8e27b95
|
@ -39,6 +39,8 @@ if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "s390x")
|
|||
list(APPEND B2_OPTIONS architecture=s390x)
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
||||
list(APPEND B2_OPTIONS architecture=arm)
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "ppc64le")
|
||||
list(APPEND B2_OPTIONS architecture=power)
|
||||
else()
|
||||
list(APPEND B2_OPTIONS architecture=x86)
|
||||
endif()
|
||||
|
|
|
@ -303,6 +303,8 @@ function(boost_modular_build)
|
|||
list(APPEND B2_OPTIONS address-model=64 architecture=arm)
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "s390x")
|
||||
list(APPEND B2_OPTIONS address-model=64 architecture=s390x)
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "ppc64le")
|
||||
list(APPEND B2_OPTIONS address-model=64 architecture=power)
|
||||
else()
|
||||
list(APPEND B2_OPTIONS address-model=32 architecture=x86)
|
||||
endif()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "boost-modular-build-helper",
|
||||
"version-string": "1.75.0",
|
||||
"port-version": 2,
|
||||
"port-version": 3,
|
||||
"dependencies": [
|
||||
"boost-uninstall"
|
||||
]
|
||||
|
|
|
@ -240,8 +240,8 @@ selectCXX()
|
|||
UNAME="$(uname)"
|
||||
ARCH="$(uname -m)"
|
||||
|
||||
# Force using system utilities for building vcpkg if host arch is arm, arm64, or s390x.
|
||||
if [ "$ARCH" = "armv7l" -o "$ARCH" = "aarch64" -o "$ARCH" = "s390x" ]; then
|
||||
# Force using system utilities for building vcpkg if host arch is arm, arm64, s390x, or ppc64le.
|
||||
if [ "$ARCH" = "armv7l" -o "$ARCH" = "aarch64" -o "$ARCH" = "s390x" -o "$ARCH" = "ppc64le" ]; then
|
||||
vcpkgUseSystem=true
|
||||
fi
|
||||
|
||||
|
|
|
@ -198,6 +198,8 @@ else()
|
|||
set(_VCPKG_TARGET_TRIPLET_ARCH x64)
|
||||
elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "s390x")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH s390x)
|
||||
elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "ppc64le")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH ppc64le)
|
||||
elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "armv7l")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH arm)
|
||||
elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||
|
|
|
@ -29,6 +29,7 @@ namespace vcpkg::System
|
|||
ARM,
|
||||
ARM64,
|
||||
S390X,
|
||||
PPC64LE,
|
||||
};
|
||||
|
||||
Optional<CPUArchitecture> to_cpu_architecture(StringView arch);
|
||||
|
|
|
@ -210,13 +210,16 @@ int main(const int argc, const char* const* const argv)
|
|||
|
||||
load_config(fs);
|
||||
|
||||
#if (defined(__aarch64__) || defined(__arm__) || defined(__s390x__) || defined(_M_ARM) || defined(_M_ARM64)) && \
|
||||
#if (defined(__aarch64__) || defined(__arm__) || defined(__s390x__) || \
|
||||
((defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || defined(__PPC64LE__)) && \
|
||||
defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) || \
|
||||
defined(_M_ARM) || defined(_M_ARM64)) && \
|
||||
!defined(_WIN32) && !defined(__APPLE__)
|
||||
if (!System::get_environment_variable("VCPKG_FORCE_SYSTEM_BINARIES").has_value())
|
||||
{
|
||||
Checks::exit_with_message(
|
||||
VCPKG_LINE_INFO,
|
||||
"Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm and s390x platforms.");
|
||||
"Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm, s390x, and ppc64le platforms.");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ namespace vcpkg
|
|||
if (Strings::case_insensitive_ascii_equals(arch, "arm")) return CPUArchitecture::ARM;
|
||||
if (Strings::case_insensitive_ascii_equals(arch, "arm64")) return CPUArchitecture::ARM64;
|
||||
if (Strings::case_insensitive_ascii_equals(arch, "s390x")) return CPUArchitecture::S390X;
|
||||
if (Strings::case_insensitive_ascii_equals(arch, "ppc64le")) return CPUArchitecture::PPC64LE;
|
||||
return nullopt;
|
||||
}
|
||||
|
||||
|
@ -39,7 +40,8 @@ namespace vcpkg
|
|||
case CPUArchitecture::ARM: return "arm";
|
||||
case CPUArchitecture::ARM64: return "arm64";
|
||||
case CPUArchitecture::S390X: return "s390x";
|
||||
default: Checks::unreachable(VCPKG_LINE_INFO);
|
||||
case CPUArchitecture::PPC64LE: return "ppc64le";
|
||||
default: Checks::exit_with_message(VCPKG_LINE_INFO, "unexpected vcpkg::System::CPUArchitecture");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,6 +64,9 @@ namespace vcpkg
|
|||
return CPUArchitecture::ARM64;
|
||||
#elif defined(__s390x__)
|
||||
return CPUArchitecture::S390X;
|
||||
#elif (defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || defined(__PPC64LE__)) && \
|
||||
defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||
return CPUArchitecture::PPC64LE;
|
||||
#else // choose architecture
|
||||
#error "Unknown host architecture"
|
||||
#endif // choose architecture
|
||||
|
|
|
@ -65,6 +65,10 @@ namespace vcpkg
|
|||
{
|
||||
return CPUArchitecture::S390X;
|
||||
}
|
||||
if (Strings::starts_with(this->canonical_name(), "ppc64le-"))
|
||||
{
|
||||
return CPUArchitecture::PPC64LE;
|
||||
}
|
||||
|
||||
return nullopt;
|
||||
}
|
||||
|
@ -99,6 +103,9 @@ namespace vcpkg
|
|||
return Triplet::from_canonical_name("arm-linux");
|
||||
#elif defined(__s390x__)
|
||||
return Triplet::from_canonical_name("s390x-linux");
|
||||
#elif (defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || defined(__PPC64LE__)) && \
|
||||
defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||
return Triplet::from_canonical_name("ppc64le-linux");
|
||||
#else
|
||||
return Triplet::from_canonical_name("x64-linux");
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
set(VCPKG_TARGET_ARCHITECTURE ppc64le)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "39acb181b681e8ac20ff594d3ac1782bfbb37ba2",
|
||||
"version-string": "1.75.0",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "1b4dda192c485153b97512519e48a06202fd6930",
|
||||
"version-string": "1.75.0",
|
||||
|
|
|
@ -674,7 +674,7 @@
|
|||
},
|
||||
"boost-modular-build-helper": {
|
||||
"baseline": "1.75.0",
|
||||
"port-version": 2
|
||||
"port-version": 3
|
||||
},
|
||||
"boost-move": {
|
||||
"baseline": "1.75.0",
|
||||
|
|
Загрузка…
Ссылка в новой задаче