-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable rust powerpc-unknown-linux-gnuspe for qoriq (#5879)
* py311, sabnzbd, homeassistant: Enable debug_symbols for qoriq * py311, sabnzbd, homeassistant: Enable debug_symbols also for x64 * py311: Force compiler LTO optimizations with exceptions - NOT when testing all wheels - NOT when including debug_info symbols - NOT when using PPC arch (fails on qoriq) * py311+sabnzbd+homeassistant: Enable debug_info symbols for all archs * rustc: Add RUSTFLAGS environment variable option * qoriq: Tentatively use additional RUSTFLAGS for arch * toolchain qoriq-6.2.4: Revert RUSTFLAGS and create standard links - Removing from RUSTFLAGS target-feature=-hard-float,-spe as unsupported - Create symbolic links using standard "target triple" naming in order to avoid confusion due to the usage from Synology of e500v2 specific * rust: Add support for powerpc-unknown-linux-gnuspe tier 3 target * rust: Use RUSTUP_TOOLCHAIN env variable to define used toolchain * rust: Fix default toolchain checking * duplicity: Update bcrypt wheel from version 4.0.1 to 4.1.1 * py310-py311: Update bcrypt wheel from version 4.0.1 to 4.1.1 * homeassistant: Update bcrypt 4.1.1 and cryptography 41.0.3 * rust: Enforce using newer native/cmake when building toolchain * rust: Fix typo when building native/cmake * rust: Tentative to fix online issue relatively to cmake * rust: Different approach to enforce using native/cmake * rust: Enforcing --sysroot at link time for tier-3 toolchain builds * rust: Enforce sysroot using extra RUSTFLAGS variable * rust: Downgrade to stage1 level compiler and disable toolkit * rust: Rename custom toolchain to match RUSTUP_TOOLCHAIN for clarity * rust: Revert back at using stage2 compiler as it fails online * rust: Clean-up stage0 and stage1 after building stage2 * rust: Add ADDITIONAL_RUSTFLAGS to target-tripple rustflags env var * rust.mk: Use RUSTUP_TOOLCHAIN overriding +stable|$(toolchain) * rust: First working version for powerpc-*-gnuspe for qoriq arch NOTE: requires clean-up and review of every extra variable set * rust: Removed unused build flags * rust: Enforce deleting config.toml prior to setting up compiler * rust: Either use native/llvm-9.0 or include clang-llvm to docker * rust: Attempt at fixing LLVM error on github-action * rust: Fix typo in precedent commit * rust: Remove previous LLVM attempts * rust: Add llvm-13 and clang-13 part of the base install * rust: Revert commit related to llvm-13 and clang-13 in Dockerfile * rust: Enforce build to x86_64-unknown-linux-gnu * rust: Revert enforcing build triplet * rust: Disable download-ci-llvm to enforce building of LLVM * rust: Don't enforce building x86_64 and remove llvm to use default * rust: Enforce building LLVM * rust: tentative typo fixing for llvm building * rust: Change default stage to 2 Hoping to solve github-action error message: failed: x.py should be run with `--stage 2` on CI, but was run with `--stage 1` * rust: Re-try downloading LLVM using if-unchanged option * rust: llvm "if-unchanged" seem to reuquire quotes * rust: re-introduce host target as otherwise missing crates This was fixed earlier by ensuring to build host rust as well part of that toolchain otherwise get errors such as: error[E0463]: can't find crate for `core` error[E0463]: can't find crate for `compiler_builtins` * rust: Specify RUSTUP_TOOLCHAIN so python wheel can build * native/rust-qoriq: Ability to download and use pre-built toolchain * rust: Enable usage of native/rust-qoriq * rust: Fix toolchain setting-up dues to TC_ARCH vs ARCH usages * rust: "ARCH" detection for toolchain independantly from location When called from cross or spk usage of $(ARCH) When called from toolchain: - Usage of $(TC_ARCH) when $(TC_NAME) does not exist - Usage of $(TC_NAME) for generic archs * python311: Remove duplicate code kept from rebasing * homeassistant: Disable GCC_DEBUG_INFO * python311: Disable GCC_DEBUG_INFO * sabnzbd: Disable GCC_DEBUG_INFO * qoriq-6.2.4: convert test to -L and using ln -sf (@hgy59) * rust: Enable RUST_BUILD_TOOLCHAIN=1 to test rebuild still works * python311: Fix typo relatively to failure on old ppc only * tc-rust.mk: Removing left-over exit 2 for debugging purpose * rust-qoriq: Disable toolchain testing building in favor of native
- Loading branch information
Showing
12 changed files
with
176 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,59 @@ | ||
# Configuration for rust compiler | ||
# | ||
# | ||
|
||
# Add cargo for rust compiler to default PATH | ||
ifneq ($(BASE_DISTRIB_DIR),) | ||
# Enforce newer cmake when building tier-3 toolchains | ||
CMAKE_PATH = $(abspath $(WORK_DIR)/../../../native/cmake/work-native/install/usr/local/bin) | ||
export CARGO_HOME=$(BASE_DISTRIB_DIR)/cargo | ||
export RUSTUP_HOME=$(BASE_DISTRIB_DIR)/rustup | ||
export PATH:=$(BASE_DISTRIB_DIR)/cargo/bin:$(PATH) | ||
export PATH:=$(abspath $(BASE_DISTRIB_DIR)/cargo/bin):$(CMAKE_PATH):$(PATH) | ||
endif | ||
|
||
ifeq ($(RUST_TOOLCHAIN),) | ||
RUST_TOOLCHAIN = stable | ||
ifeq ($(RUSTUP_DEFAULT_TOOLCHAIN),) | ||
RUSTUP_DEFAULT_TOOLCHAIN = stable | ||
endif | ||
|
||
RUST_TARGET = | ||
# When calling directly from toolchain/syno-<arch>-<version> | ||
# ARCH variable is still unset thus using $(TC_ARCH) although | ||
# in generic archs we must rely on $(TC_NANE) | ||
RUST_ARCH = $(or $(ARCH),$(lastword $(subst -, ,$(TC_NAME))),$(TC_ARCH)) | ||
|
||
# When building toolchain Tier-3 arch support | ||
# While stage-2 is the truly current compiler, stage-1 suffice our needs | ||
# https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html#stage-2-the-truly-current-compiler | ||
RUSTUP_DEFAULT_TOOLCHAIN_STAGE = 2 | ||
|
||
# map archs to rust targets | ||
ifeq ($(findstring $(ARCH), $(x64_ARCHS)),$(ARCH)) | ||
RUST_TARGET = x86_64-unknown-linux-gnu | ||
endif | ||
ifeq ($(findstring $(ARCH), $(i686_ARCHS)),$(ARCH)) | ||
RUST_TARGET = i686-unknown-linux-gnu | ||
endif | ||
ifeq ($(findstring $(ARCH), $(ARMv5_ARCHS)),$(ARCH)) | ||
# may be not supported for cargo | ||
ifeq ($(findstring $(RUST_ARCH), $(ARMv5_ARCHS)),$(RUST_ARCH)) | ||
RUST_TARGET = armv5te-unknown-linux-gnueabi | ||
endif | ||
ifeq ($(findstring $(ARCH), $(ARMv7_ARCHS)),$(ARCH)) | ||
ifeq ($(findstring $(RUST_ARCH), $(ARMv7_ARCHS)),$(RUST_ARCH)) | ||
RUST_TARGET = armv7-unknown-linux-gnueabihf | ||
endif | ||
ifeq ($(findstring $(ARCH), $(ARMv7L_ARCHS)),$(ARCH)) | ||
ifeq ($(findstring $(RUST_ARCH), $(ARMv7L_ARCHS)),$(RUST_ARCH)) | ||
RUST_TARGET = armv7-unknown-linux-gnueabi | ||
endif | ||
ifeq ($(findstring $(ARCH), $(ARMv8_ARCHS)),$(ARCH)) | ||
ifeq ($(findstring $(RUST_ARCH), $(ARMv8_ARCHS)),$(RUST_ARCH)) | ||
RUST_TARGET = aarch64-unknown-linux-gnu | ||
endif | ||
ifeq ($(findstring $(ARCH), $(PPC_ARCHS)),$(ARCH)) | ||
RUST_TARGET = powerpc-unknown-linux-gnu | ||
ifeq ($(findstring $(RUST_ARCH), $(PPC_ARCHS)),$(RUST_ARCH)) | ||
RUST_BUILD_TOOLCHAIN = 0 | ||
RUST_TARGET = powerpc-unknown-linux-gnuspe | ||
TC_RUSTUP_TOOLCHAIN = stage$(RUSTUP_DEFAULT_TOOLCHAIN_STAGE)-$(RUST_TARGET) | ||
endif | ||
ifeq ($(findstring $(RUST_ARCH), $(x64_ARCHS)),$(RUST_ARCH)) | ||
RUST_TARGET = x86_64-unknown-linux-gnu | ||
endif | ||
ifeq ($(findstring $(RUST_ARCH), $(i686_ARCHS)),$(RUST_ARCH)) | ||
RUST_TARGET = i686-unknown-linux-gnu | ||
endif | ||
|
||
ifeq ($(RUST_TARGET),) | ||
$(error Arch $(ARCH) not supported) | ||
$(error Arch $(RUST_ARCH) not supported) | ||
endif | ||
|
||
# By default use the default toolchain if unset | ||
ifeq ($(TC_RUSTUP_TOOLCHAIN),) | ||
TC_RUSTUP_TOOLCHAIN = $(RUSTUP_DEFAULT_TOOLCHAIN) | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
PKG_NAME = rust-qoriq | ||
PKG_VERS = 1.77.0-nightly | ||
PKG_EXT = txz | ||
PKG_DIST_NAME = stage2_powerpc-unknown-linux-gnuspe.txz | ||
PKG_DIST_SITE = https://github.com/SynoCommunity/spksrc/releases/download/toolchains%2Frust%2F1.77.0-nightly | ||
EXTRACT_PATH = $(INSTALL_DIR)/$(INSTALL_PREFIX) | ||
|
||
DEPENDS = | ||
|
||
HOMEPAGE = https://www.rust-lang.org/ | ||
COMMENT = A language empowering everyone to build reliable and efficient software. | ||
LICENSE = Apache-2.0, MIT licenses | ||
|
||
# extracted directly into install folder | ||
INSTALL_TARGET = nop | ||
POST_INSTALL_TARGET = rust-qoriq-postinstall | ||
|
||
CARGO_PATH=$(abspath $(BASE_DISTRIB_DIR)/cargo/bin) | ||
RUSTUP_HOME=$(abspath $(BASE_DISTRIB_DIR)/rustup) | ||
|
||
include ../../mk/spksrc.native-install.mk | ||
|
||
.PHONY: rust-qoriq-postinstall | ||
rust-qoriq-postinstall: | ||
export PATH="$(CARGO_PATH):$${PATH}" ; \ | ||
export RUSTUP_HOME="$(RUSTUP_HOME)" ; \ | ||
which rustup ; \ | ||
rustup toolchain link stage2-powerpc-unknown-linux-gnuspe $(abspath $(INSTALL_DIR)/$(INSTALL_PREFIX)) ; \ | ||
rustup show |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
stage2_powerpc-unknown-linux-gnuspe.txz SHA1 377911465d0364e13136fa50d19bfd0a3660a373 | ||
stage2_powerpc-unknown-linux-gnuspe.txz SHA256 e02030225a6e6e1f680f4bdc4e902506f8742a73ba02673a80640d9aaf336fea | ||
stage2_powerpc-unknown-linux-gnuspe.txz MD5 1129e9a88ccfaa94217a18e26d8adc00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters