Skip to content

[openwrt-23.05] rust: fix host build on aarch64 darwin#21867

Merged
1715173329 merged 1 commit into
openwrt:openwrt-23.05from
jonasjelonek:23.05-rust-host-fix-aarch64-darwin-build
Aug 20, 2023
Merged

[openwrt-23.05] rust: fix host build on aarch64 darwin#21867
1715173329 merged 1 commit into
openwrt:openwrt-23.05from
jonasjelonek:23.05-rust-host-fix-aarch64-darwin-build

Conversation

@jonasjelonek

@jonasjelonek jonasjelonek commented Aug 19, 2023

Copy link
Copy Markdown
Member

Maintainer: @lu-zero
Compile tested: yes

Description:
Backport of #21837 and #21845 to OpenWrt 23.05

I wasn't quite sure how to backport this because I had a mistake in the first PR, nevertheless it got merged and then submitted a second PR to fix that. Usually backporting seems to be done just by cherry-picking. Please tell me if that should be done in another way.

(cherry picked from 105fa39 and c287e98)
(squashed 105fa39 and c287e98)

@jonasjelonek

Copy link
Copy Markdown
Member Author

cc @PolynomialDivision @1715173329

@lu-zero

lu-zero commented Aug 19, 2023

Copy link
Copy Markdown
Contributor

I'd squash them in 1.

rust/host failed to compile on macOS running on Apple Silicon M1 Pro
because the host target triple is autogenerated to be
'arm64-unknown-linux-'. Rust doesn't have such a target triple, thus the
build fails because there are no pre-built artifacts for bootstrapping.

Fix this by setting RUSTC_HOST_ARCH to 'aarch64-apple-darwin' in case
our host is HOST_ARCH=arm64 and HOST_OS=darwin.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
(squashed 105fa39 and c287e98)
@jonasjelonek jonasjelonek force-pushed the 23.05-rust-host-fix-aarch64-darwin-build branch from 1bdb250 to 44c5da4 Compare August 19, 2023 08:58
@1715173329 1715173329 merged commit 7b531ac into openwrt:openwrt-23.05 Aug 20, 2023
@jonasjelonek jonasjelonek deleted the 23.05-rust-host-fix-aarch64-darwin-build branch August 20, 2023 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants