From 693c0a5de939eecf671585b0d2662fc058314e78 Mon Sep 17 00:00:00 2001 From: Alex Garcia <115115137+lex-ibm@users.noreply.github.com> Date: Fri, 27 Mar 2026 12:25:06 -0500 Subject: [PATCH] feat(ppc64): add RPM, DEB and CLI (#2767) --- build_cli.sh | 17 +++++++++++++++- check_tags.sh | 31 ++++++++++++++++++++---------- patches/linux/arch-1-ppc64le.patch | 5 +++++ release_notes.md | 14 +++++++++++++- 4 files changed, 55 insertions(+), 12 deletions(-) diff --git a/build_cli.sh b/build_cli.sh index a2af2d4..21d3b46 100755 --- a/build_cli.sh +++ b/build_cli.sh @@ -62,7 +62,7 @@ else if [[ "${VSCODE_ARCH}" == "arm64" ]]; then VSCODE_CLI_TARGET="aarch64-unknown-linux-gnu" - + if [[ "${CI_BUILD}" != "no" ]]; then export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc export CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc @@ -81,6 +81,21 @@ else export CXX_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-g++ export PKG_CONFIG_ALLOW_CROSS=1 fi + elif [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then + VSCODE_CLI_TARGET="powerpc64le-unknown-linux-gnu" + + # Use system libs instead of @vscode/openssl-prebuilt + mkdir -p openssl/out/ppc64le-linux/ + ln -sf /usr/lib/powerpc64le-linux-gnu openssl/out/ppc64le-linux/lib + ln -sf /usr/include openssl/out/ppc64le-linux/include + + if [[ "${CI_BUILD}" != "no" ]] && [[ "$(uname -m)" != "ppc64le" ]]; then + export CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_LINKER=powerpc64le-linux-gnu-gcc-10 + export CC_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-gcc-10 + export CXX_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-g++-10 + export PKG_CONFIG_ALLOW_CROSS=1 + fi + elif [[ "${VSCODE_ARCH}" == "x64" ]]; then VSCODE_CLI_TARGET="x86_64-unknown-linux-gnu" fi diff --git a/check_tags.sh b/check_tags.sh index e8b8ccc..aa4b9d5 100755 --- a/check_tags.sh +++ b/check_tags.sh @@ -362,8 +362,20 @@ elif [[ "${ASSETS}" != "null" ]]; then # linux-ppc64le if [[ "${VSCODE_ARCH}" == "ppc64le" || "${CHECK_ALL}" == "yes" ]]; then export SHOULD_BUILD_APPIMAGE="no" - export SHOULD_BUILD_DEB="no" - export SHOULD_BUILD_RPM="no" + + if [[ -z $( contains "ppc64el.deb" ) ]]; then + echo "Building on Linux PowerPC64LE because we have no DEB" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_DEB="no" + fi + + if [[ -z $( contains "ppc64le.rpm" ) ]]; then + echo "Building on Linux PowerPC64LE because we have no RPM" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_RPM="no" + fi if [[ -z $( contains "${APP_NAME}-linux-ppc64le-${RELEASE_VERSION}.tar.gz" ) ]]; then echo "Building on Linux PowerPC64LE because we have no TAR" @@ -372,7 +384,6 @@ elif [[ "${ASSETS}" != "null" ]]; then export SHOULD_BUILD_TAR="no" fi - if [[ "${CHECK_REH}" != "no" && -z $( contains "${APP_NAME_LC}-reh-linux-ppc64le-${RELEASE_VERSION}.tar.gz" ) ]]; then echo "Building on Linux PowerPC64LE because we have no REH archive" export SHOULD_BUILD="yes" @@ -387,7 +398,12 @@ elif [[ "${ASSETS}" != "null" ]]; then export SHOULD_BUILD_REH_WEB="no" fi - export SHOULD_BUILD_CLI="no" + if [[ -z $( contains "${APP_NAME_LC}-cli-linux-ppc64le-${RELEASE_VERSION}.tar.gz" ) ]]; then + echo "Building on Linux PowerPC64LE because we have no CLI archive" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_CLI="no" + fi if [[ "${SHOULD_BUILD}" != "yes" ]]; then echo "Already have all the Linux PowerPC64LE builds" @@ -617,12 +633,7 @@ else if [[ "${IS_SPEARHEAD}" == "yes" ]]; then export SHOULD_BUILD_SRC="yes" elif [[ "${OS_NAME}" == "linux" ]]; then - if [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then - SHOULD_BUILD_DEB="no" - SHOULD_BUILD_RPM="no" - SHOULD_BUILD_TAR="no" - SHOULD_BUILD_CLI="no" - elif [[ "${VSCODE_ARCH}" == "riscv64" ]]; then + if [[ "${VSCODE_ARCH}" == "riscv64" ]]; then SHOULD_BUILD_DEB="no" SHOULD_BUILD_RPM="no" SHOULD_BUILD_CLI="no" diff --git a/patches/linux/arch-1-ppc64le.patch b/patches/linux/arch-1-ppc64le.patch index f01b6d3..2333431 100644 --- a/patches/linux/arch-1-ppc64le.patch +++ b/patches/linux/arch-1-ppc64le.patch @@ -312,6 +312,11 @@ index 44c8597..679aacb 100644 + } else if cfg!(target_arch = "powerpc64") { + Platform::LinuxPPC64LE } else { +@@ -213,2 +215,4 @@ async fn check_glibcxx_version() -> Result { + const DEFAULT_LIB_PATH: &str = "/usr/lib64/libstdc++.so.6"; ++ #[cfg(target_arch = "powerpc64")] ++ const DEFAULT_LIB_PATH: &str = "/usr/lib64/libstdc++.so.6"; + #[cfg(any(target_arch = "x86", target_arch = "arm"))] diff --git a/resources/server/bin/helpers/check-requirements-linux.sh b/resources/server/bin/helpers/check-requirements-linux.sh index 8ea4c0b..94028e3 100644 --- a/resources/server/bin/helpers/check-requirements-linux.sh diff --git a/release_notes.md b/release_notes.md index c9fdf95..d0e8895 100644 --- a/release_notes.md +++ b/release_notes.md @@ -221,7 +221,15 @@ update vscode to [@@MS_TAG@@](@@MS_URL@@) - + + + + + + + + + @@ -233,6 +241,10 @@ update vscode to [@@MS_TAG@@](@@MS_URL@@) + + + +
LinuxLinux.deb@@BINARY_NAME@@_@@VERSION@@_ppc64el.deb
.rpm@@BINARY_NAME@@-@@VERSION@@-el8.ppc64le.rpm
.tar.gz @@APP_NAME@@-linux-ppc64le-@@VERSION@@@@QUALITY@@.tar.gz
Web Host @@APP_NAME_LC@@-reh-web-linux-ppc64le-@@VERSION@@@@QUALITY@@.tar.gz
CLI@@APP_NAME_LC@@-cli-linux-ppc64le-@@VERSION@@@@QUALITY@@.tar.gz
## RISC-V 64bits