mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-13 11:29:46 +03:00
Cross compiling go programs with cross-native2 fails for armv7, riscv64 and armhf unless we use CGO_ENABLED=1 in the APKBUILD (see related aports issue). Add --sysroot to CGO_CFLAGS, so cgo can find the includes and doesn't fail with: go build -buildmode=pie -modcacherw -trimpath -buildvcs=false -ldflags "-s -w -X main.Version=2.6.1" -o mkinitfs ./cmd/mkinitfs # runtime/cgo _cgo_export.c:3:10: fatal error: stdlib.h: No such file or directory Add it to LDFLAGS too for linking against libraries from the sysroot. Related: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15809 Related: https://stackoverflow.com/a/38835938 |
||
---|---|---|
.. | ||
__init__.py | ||
_package.py | ||
autodetect.py | ||
backend.py | ||
checksum.py | ||
envkernel.py | ||
init.py | ||
kconfig.py | ||
newapkbuild.py | ||
other.py |