Skip to content

Commit a15b758

Browse files
authored
Merge pull request #1003 from neersighted/armhf
debian: build armv6 binaries for armhf
2 parents 6298c93 + df6192b commit a15b758

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

deb/common/rules

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
#!/usr/bin/make -f
22

3+
# Include default Makefile variables.
4+
include /usr/share/dpkg/default.mk
5+
6+
# Build all armhf binaries as ARMv6 with hard float, to support both
7+
# Debian armhf and Raspbian armhf.
8+
ifeq ($(DEB_TARGET_ARCH),armhf)
9+
export CFLAGS += -marm -march=armv6+fp
10+
export GOARM := 6
11+
endif
12+
313
VERSION ?= $(shell cat engine/VERSION)
4-
TARGET_ARCH = $(shell dpkg-architecture -qDEB_TARGET_ARCH)
514
# TODO(thaJeztah): allow passing this version when building.
615
PKG_REVISION ?= 1
716
export PKG_REVISION
817

9-
# FIXME: quick hardcoding of GOARM for raspbian; replace with a holistic
10-
# refactoring of how we handle target architecture
11-
distribution := $(shell . /etc/os-release; echo "$${ID}")
12-
ifeq ($(distribution),raspbian)
13-
export GOARM=6
14-
endif
15-
1618
# force packages to be built with xz compression, as Ubuntu 21.10 and up use
1719
# zstd compression, which is non-standard, and breaks 'dpkg-sig --verify'
1820
override_dh_builddeb:

0 commit comments

Comments
 (0)