-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix build for Raspberry Pi 1 B+ and Zero
- Loading branch information
Showing
8 changed files
with
113 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/bin/ubxtool.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# See `build-ubxtool` script for cross-compilation options. | ||
|
||
# 1. GCC has issues with exception unwinding with static build of libmusl. | ||
# The bug is fixed for gcc-10, but alpine:3.11 has 9.2.0-r3 and alpine:3.10 has 8.3.0-r0. | ||
# Both are affected per test and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91737 | ||
# | ||
# 2. clang-9.0.0-r1 from alpine:3.11 generates wrong FPU instructions for Raspberry Pi 1 B+ and Zero. | ||
# It uses d{16..31} registers for a VFPv2 FPU and that leads to SIGILL. | ||
# The bug is described at https://reviews.llvm.org/D67375 | ||
# The bug is fixed in clang-10: https://reviews.llvm.org/rGddf5e86c222c6b5226be53e1250421fe608bb4d0 | ||
# | ||
# 3. clang-8.0.0-r0 from alpine:3.10 is not affected by the bug, so we use it. | ||
FROM alpine:3.10 AS build-env | ||
|
||
# g++ is still installed to bring C++ headers like <string>, <map>, etc. | ||
# See https://pkgs.alpinelinux.org/contents?file=iostream&branch=v3.10&arch=armhf | ||
RUN set -ex && \ | ||
apk add --no-cache \ | ||
clang \ | ||
g++ \ | ||
git \ | ||
make \ | ||
protobuf-dev \ | ||
&& \ | ||
: | ||
|
||
ADD . /galmon/ | ||
WORKDIR /galmon/ | ||
RUN CXX=clang make ubxtool.static | ||
|
||
FROM scratch | ||
COPY --from=build-env /galmon/ubxtool.static /opt/ubxtool | ||
ENTRYPOINT ["/opt/ubxtool"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters