diff options
| author | Andrei Lebedev <lebdron@gmail.com> | 2021-01-22 19:37:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-22 10:37:26 -0800 |
| commit | 83b8e27b95e0117a80fe5e2e4749ecaede098fa0 (patch) | |
| tree | 20bf19eea3665ccefe712d2c3592a4626d1a8843 | |
| parent | 34a9432e2ba94bb4aa9bbbeb2a92aa3c0b1717a0 (diff) | |
| download | vcpkg-83b8e27b95e0117a80fe5e2e4749ecaede098fa0.tar.gz vcpkg-83b8e27b95e0117a80fe5e2e4749ecaede098fa0.zip | |
[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>
| -rw-r--r-- | ports/boost-modular-build-helper/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | ports/boost-modular-build-helper/boost-modular-build.cmake | 2 | ||||
| -rw-r--r-- | ports/boost-modular-build-helper/vcpkg.json | 2 | ||||
| -rw-r--r-- | scripts/bootstrap.sh | 4 | ||||
| -rw-r--r-- | scripts/buildsystems/vcpkg.cmake | 2 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/base/system.h | 1 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg.cpp | 7 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg/base/system.cpp | 7 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg/triplet.cpp | 7 | ||||
| -rw-r--r-- | triplets/community/ppc64le-linux.cmake | 5 | ||||
| -rw-r--r-- | versions/b-/boost-modular-build-helper.json | 5 | ||||
| -rw-r--r-- | versions/baseline.json | 2 |
12 files changed, 39 insertions, 7 deletions
diff --git a/ports/boost-modular-build-helper/CMakeLists.txt b/ports/boost-modular-build-helper/CMakeLists.txt index ce33c0f4a..d868b5ac8 100644 --- a/ports/boost-modular-build-helper/CMakeLists.txt +++ b/ports/boost-modular-build-helper/CMakeLists.txt @@ -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()
diff --git a/ports/boost-modular-build-helper/boost-modular-build.cmake b/ports/boost-modular-build-helper/boost-modular-build.cmake index 481dfd510..09daaeea3 100644 --- a/ports/boost-modular-build-helper/boost-modular-build.cmake +++ b/ports/boost-modular-build-helper/boost-modular-build.cmake @@ -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()
diff --git a/ports/boost-modular-build-helper/vcpkg.json b/ports/boost-modular-build-helper/vcpkg.json index 3ae62630e..bc96cdaef 100644 --- a/ports/boost-modular-build-helper/vcpkg.json +++ b/ports/boost-modular-build-helper/vcpkg.json @@ -1,7 +1,7 @@ { "name": "boost-modular-build-helper", "version-string": "1.75.0", - "port-version": 2, + "port-version": 3, "dependencies": [ "boost-uninstall" ] diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index ba76f4f63..b7d889f9e 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -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 diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index e13c3333b..296920939 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -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") diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index da14fa4bb..992533eb5 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -29,6 +29,7 @@ namespace vcpkg::System ARM, ARM64, S390X, + PPC64LE, }; Optional<CPUArchitecture> to_cpu_architecture(StringView arch); diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 250bca52a..ccc951f10 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -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 diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 687f6fa9c..b18a41e6d 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -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 diff --git a/toolsrc/src/vcpkg/triplet.cpp b/toolsrc/src/vcpkg/triplet.cpp index dbb82e3c8..e69f75b11 100644 --- a/toolsrc/src/vcpkg/triplet.cpp +++ b/toolsrc/src/vcpkg/triplet.cpp @@ -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 diff --git a/triplets/community/ppc64le-linux.cmake b/triplets/community/ppc64le-linux.cmake new file mode 100644 index 000000000..70fa5b44c --- /dev/null +++ b/triplets/community/ppc64le-linux.cmake @@ -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) diff --git a/versions/b-/boost-modular-build-helper.json b/versions/b-/boost-modular-build-helper.json index f0353be18..52819f681 100644 --- a/versions/b-/boost-modular-build-helper.json +++ b/versions/b-/boost-modular-build-helper.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "39acb181b681e8ac20ff594d3ac1782bfbb37ba2", + "version-string": "1.75.0", + "port-version": 3 + }, + { "git-tree": "1b4dda192c485153b97512519e48a06202fd6930", "version-string": "1.75.0", "port-version": 2 diff --git a/versions/baseline.json b/versions/baseline.json index 4ed65a246..d09baa59e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -674,7 +674,7 @@ }, "boost-modular-build-helper": { "baseline": "1.75.0", - "port-version": 2 + "port-version": 3 }, "boost-move": { "baseline": "1.75.0", |
