From 24ba56cfa685fe7dd31668fdf87a8db1ca4ba8d2 Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Fri, 18 Jul 2025 14:05:09 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20linux-arm=E5=90=AF=E7=94=A8CGO=E7=BC=96?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_binary.yaml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_binary.yaml b/.github/workflows/build_binary.yaml index fca1622b..387fa9c6 100644 --- a/.github/workflows/build_binary.yaml +++ b/.github/workflows/build_binary.yaml @@ -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 ;; *)