fix: linux-arm启用CGO编译

This commit is contained in:
spiritlhl
2025-07-18 14:05:09 +00:00
parent ebefd64a3d
commit 24ba56cfa6

View File

@@ -135,6 +135,16 @@ jobs:
ldflags: "-extldflags=-static -s -w"
packages: "build-essential gcc-powerpc64le-linux-gnu"
runner: ubuntu-latest
- goos: linux
goarch: arm
goarm: 7
cgo_enabled: "1"
cc: arm-linux-gnueabihf-gcc
cflags: "-O1 -fno-stack-protector"
ldflags: "-extldflags=-static -s -w"
packages: "build-essential gcc-arm-linux-gnueabihf"
runner: ubuntu-latest
- goos: windows
goarch: amd64
@@ -173,13 +183,6 @@ jobs:
ldflags: "-s -w"
runner: macos-latest
- goos: linux
goarch: arm
goarm: 7
cgo_enabled: "0"
ldflags: "-s -w"
runner: ubuntu-latest
- goos: linux
goarch: s390x
cgo_enabled: "0"
@@ -258,6 +261,8 @@ jobs:
sudo apt-get install -y build-essential gcc-mips64el-linux-gnuabi64 ;;
linux-ppc64le)
sudo apt-get install -y build-essential gcc-powerpc64le-linux-gnu ;;
linux-arm)
sudo apt-get install -y build-essential gcc-arm-linux-gnueabihf ;;
windows-amd64|windows-386)
sudo apt-get install -y build-essential gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 ;;
*)