Skip to content

Commit 0e2ab2e

Browse files
authored
Merge pull request #48 from dibu28/codex/fix-arm-v7-build-error
Adjust ARMv7 flags
2 parents 08cdbeb + 1eb6c4e commit 0e2ab2e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
goarch: arm
3838
goarm: 7
3939
alias: mv78230
40-
zig: arm-linux-gnueabihf
40+
zig: armv7a-linux-gnueabihf
4141
- goos: linux
4242
goarch: ppc64le
4343
zig: powerpc64le-linux-gnu
@@ -96,10 +96,12 @@ jobs:
9696
export CGO_ENABLED=1
9797
export CC="zig cc -target ${{ matrix.zig }}"
9898
export CXX="zig c++ -target ${{ matrix.zig }}"
99+
# Clear any cached compiler flags that might include -mcpu
100+
unset CFLAGS CXXFLAGS CGO_CFLAGS CGO_CXXFLAGS
99101
if [ "${{ matrix.goarch }}" = "arm" ]; then
100-
# Use generic ARMv7 tuning flags
101-
export CGO_CFLAGS="-march=armv7-a -mfpu=neon"
102-
export CGO_CXXFLAGS="-march=armv7-a -mfpu=neon"
102+
# Use a specific ARMv7 CPU that Clang accepts
103+
export CGO_CFLAGS="-mcpu=cortex-a7 -mfpu=neon"
104+
export CGO_CXXFLAGS="$CGO_CFLAGS"
103105
fi
104106
;;
105107
*)

0 commit comments

Comments
 (0)