-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux-armv6: upgrade to Debian 11 (glibc 2.31)
Allows use of the standard crossbuild tooling
- Loading branch information
Showing
4 changed files
with
18 additions
and
19 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 |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
}, | ||
"type": "commonjs", | ||
"config": { | ||
"glibc": ">=2.28" | ||
"glibc": ">=2.31" | ||
}, | ||
"os": [ | ||
"linux" | ||
|
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
FROM debian:buster | ||
FROM debian:bullseye | ||
LABEL maintainer="Lovell Fuller <[email protected]>" | ||
|
||
# Create Debian 10 (glibc 2.28) container suitable for cross-compiling Linux ARMv6 binaries | ||
# Create Debian 11 (glibc 2.31) container suitable for cross-compiling Linux ARMv6 binaries | ||
|
||
# Path settings | ||
ENV \ | ||
RUSTUP_HOME="/usr/local/rustup" \ | ||
CARGO_HOME="/usr/local/cargo" \ | ||
PATH="/usr/local/cargo/bin:/root/tools/x64-gcc-6.5.0/arm-rpi-linux-gnueabihf/bin:$PATH" | ||
PATH="/usr/local/cargo/bin:$PATH" | ||
|
||
# Build dependencies | ||
RUN \ | ||
|
@@ -19,6 +19,7 @@ RUN \ | |
autoconf \ | ||
autopoint \ | ||
cmake \ | ||
crossbuild-essential-armhf \ | ||
gettext \ | ||
git \ | ||
gperf \ | ||
|
@@ -30,8 +31,6 @@ RUN \ | |
python3-packaging \ | ||
python3-pip \ | ||
&& \ | ||
mkdir /root/tools && \ | ||
curl -Ls https://github.com/rvagg/rpi-newer-crosstools/archive/master.tar.gz | tar xzC /root/tools --strip-components=1 && \ | ||
curl https://sh.rustup.rs -sSf | sh -s -- -y \ | ||
--no-modify-path \ | ||
--profile minimal \ | ||
|
@@ -44,7 +43,7 @@ RUN \ | |
ENV \ | ||
PKG_CONFIG="arm-linux-gnueabihf-pkg-config --static" \ | ||
PLATFORM="linux-armv6" \ | ||
CHOST="arm-rpi-linux-gnueabihf" \ | ||
CHOST="arm-linux-gnueabihf" \ | ||
RUST_TARGET="arm-unknown-linux-gnueabihf" \ | ||
FLAGS="-marm -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard" \ | ||
WITHOUT_NEON="true" \ | ||
|
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
d8ce721
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://stackoverflow.com/a/50832243, Debian's cross-compiler emits Thumb code by default, which could be the reason for the segv in sharp's test suite.
d8ce721
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thank you, I've been investigating the failure and strongly suspected this commit was related.
I thought that the existing
-mcpu
setting would determine-march
but maybe it's more like-mtune
in that regard.d8ce721
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reverted this commit via fd99a03