Skip to content

Commit

Permalink
feat: add base support for armv7-unknown-linux-gnueabihf in configura…
Browse files Browse the repository at this point in the history
…tion and targets (#76)

Signed-off-by: simonsan <[email protected]>
  • Loading branch information
simonsan authored Nov 30, 2024
1 parent f7ce832 commit 2d3a0ab
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 32 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ linker = "i686-linux-gnu-gcc"
[env]
CC_i686-unknown-linux-gnu = "i686-linux-gnu-gcc"
CC_aarch64_unknown_linux_musl = "aarch64-linux-gnu-gcc"
CC_armv7_unknown_linux_gnueabihf = "arm-linux-gnueabihf-gcc"
CC_armv7_unknown_linux_musleabihf = "arm-linux-gnueabihf-gcc"
5 changes: 5 additions & 0 deletions .github/install-arm-linkers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- name: Install armv7 and aarch64 Linkers
if: runner.os == 'Linux'
run: |
sudo apt install gcc-aarch64-linux-gnu
sudo apt install gcc-arm-none-eabi
10 changes: 5 additions & 5 deletions .github/workflows/cross-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ jobs:
target: i686-unknown-linux-gnu
architecture: i386
use-cross: true
# - os: ubuntu-latest
# os-name: linux
# target: armv7-unknown-linux-gnueabihf
# architecture: armv7
# use-cross: true
- os: ubuntu-latest
os-name: linux
target: armv7-unknown-linux-gnueabihf
architecture: armv7
use-cross: true

steps:
- name: Checkout repository
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ jobs:
architecture: i386
binary-postfix: ""
use-cross: true
# - os: ubuntu-latest
# os-name: linux
# target: armv7-unknown-linux-gnueabihf
# architecture: armv7
# binary-postfix: ""
# use-cross: true
- os: ubuntu-latest
os-name: linux
target: armv7-unknown-linux-gnueabihf
architecture: armv7
binary-postfix: ""
use-cross: true

steps:
- name: Checkout repository
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/prebuilt-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ jobs:
architecture: i386
binary-postfix: ""
use-cross: true
# - os: ubuntu-latest
# os-name: linux
# target: armv7-unknown-linux-gnueabihf
# architecture: armv7
# binary-postfix: ""
# use-cross: true
- os: ubuntu-latest
os-name: linux
target: armv7-unknown-linux-gnueabihf
architecture: armv7
binary-postfix: ""
use-cross: true

steps:
- name: Checkout repository
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: "Install armv7 and aarch64 Linkers"
if: "runner.os == 'Linux'"
run: |
sudo apt install gcc-aarch64-linux-gnu
sudo apt install gcc-arm-none-eabi
- uses: swatinem/rust-cache@v2
with:
key: ${{ join(matrix.targets, '-') }}
Expand Down
12 changes: 0 additions & 12 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
[target.x86_64-pc-windows-gnu]
# additional commands to run prior to building the package
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get --assume-yes install nasm:$CROSS_DEB_ARCH libssl-dev:$CROSS_DEB_ARCH",
]

[target.i686-unknown-linux-gnu]
image = "ghcr.io/cross-rs/i686-unknown-linux-gnu:edge"
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get --assume-yes install gcc-multilib-i686-linux-gnu gcc-i686-linux-gnu",
]

[target.x86_64-pc-windows-gnu.env]
passthrough = [
"AWS_LC_SYS_PREBUILT_NASM=1",
]
8 changes: 5 additions & 3 deletions dist-workspace.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ pr-run-mode = "upload"
tap = "rustic-rs/homebrew-tap"
# Publish jobs to run in CI
publish-jobs = ["homebrew"]
github-build-setup = "../install-arm-linkers.yml"

[dist.github-custom-runners]
aarch64-apple-darwin = "macos-latest"
aarch64-unknown-linux-gnu = "ubuntu-latest"
aarch64-unknown-linux-musl = "ubuntu-latest"
armv7-unknown-linux-gnueabihf = "ubuntu-latest"
armv7-unknown-linux-musleabihf = "ubuntu-latest"
i686-unknown-linux-gnu = "ubuntu-latest"
x86_64-apple-darwin = "macos-13"
x86_64-pc-windows-gnu = "windows-latest"
Expand All @@ -43,8 +45,8 @@ nasm = '*' # Required for building `aws-lc-sys` on Windows

[dist.dependencies.apt]
gcc-aarch64-linux-gnu = { version = '*', targets = ["aarch64-unknown-linux-gnu", "aarch64-unknown-linux-musl"] }
gcc-arm-linux-gnueabihf = { version = '*', targets = ["armv7-unknown-linux-gnueabihf"] }
gcc-arm-linux-gnueabihf = { version = '*', targets = ["armv7-unknown-linux-gnueabihf", "armv7-unknown-linux-musleabihf"] }
gcc-i686-linux-gnu = { version = '*', targets = ["i686-unknown-linux-gnu"] }
gcc-multilib-i686-linux-gnu = { version = '*', targets = ["i686-unknown-linux-gnu"] }
musl-tools = { version = '*', targets = ["aarch64-unknown-linux-musl", "x86_64-unknown-linux-musl"] }
musl-dev = { version = '*', targets = ["aarch64-unknown-linux-musl", "x86_64-unknown-linux-musl"] }
musl-tools = { version = '*', targets = ["aarch64-unknown-linux-musl", "x86_64-unknown-linux-musl", "armv7-unknown-linux-musleabihf"] }
musl-dev = { version = '*', targets = ["aarch64-unknown-linux-musl", "x86_64-unknown-linux-musl", "armv7-unknown-linux-musleabihf"] }

0 comments on commit 2d3a0ab

Please sign in to comment.