Go just calls it arm, not armhf

... which might be onto something, though how many soft-float devices are out there
anyway?
This commit is contained in:
Caleb Xavier Berger 2021-01-18 14:51:20 +00:00 committed by GitHub
parent 030c025295
commit aeb9bd7a2e
2 changed files with 18 additions and 16 deletions

View file

@ -7,7 +7,7 @@ jobs:
compile: compile:
strategy: strategy:
matrix: matrix:
target: [amd64, arm64, armhf] target: [amd64, arm64, arm]
env: env:
GOARCH: ${{ matrix.target }} GOARCH: ${{ matrix.target }}
runs-on: ubuntu-latest runs-on: ubuntu-latest

View file

@ -14,6 +14,7 @@ case "$1" in
esac esac
# Given a GOARCH target, return the GCC for that target. # Given a GOARCH target, return the GCC for that target.
function get_compiler() {
case "$GOARCH" in case "$GOARCH" in
"amd64") "amd64")
echo "x86_64-pc-linux-gnu-gcc" echo "x86_64-pc-linux-gnu-gcc"
@ -21,13 +22,14 @@ case "$GOARCH" in
"arm64") "arm64")
echo "aarch64-linux-gnu-gcc" echo "aarch64-linux-gnu-gcc"
;; ;;
"armhf") "arm")
echo "arm-linux-gnueabihf-gcc" echo "arm-linux-gnueabihf-gcc"
;; ;;
*) *)
echo "gcc" # Send us a pull request if RISC-V ever takes off echo "gcc" # Send us a pull request if RISC-V ever takes off
;; ;;
esac esac
}
# Given a GOARCH target, return a list of Ubuntu packages needed to compile for that target. # Given a GOARCH target, return a list of Ubuntu packages needed to compile for that target.
function get_pkgs() { function get_pkgs() {
@ -35,7 +37,7 @@ function get_pkgs() {
"arm64") "arm64")
echo "gcc-aarch64-linux-gnu libc6-dev-arm64-cross" echo "gcc-aarch64-linux-gnu libc6-dev-arm64-cross"
;; ;;
"armhf") "arm")
echo "gcc-arm-linux-gnueabihf libc6-dev-armhf-cross" echo "gcc-arm-linux-gnueabihf libc6-dev-armhf-cross"
;; ;;
"amd64" | *) "amd64" | *)