From 1871f39331e6bf86411a8d536d6a0d1f81dc99f5 Mon Sep 17 00:00:00 2001 From: Aleksei Voronov Date: Sun, 18 Aug 2024 21:35:03 +0200 Subject: [PATCH] Cross-compile using newer GCC Building with default GCC included in `cross` at the moment (9.4.0) fails on compiling `aws-lc-sys` with the following message: Your compiler (cc) is not supported due to a memcmp related bug reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189.We strongly recommend against using this compiler. GCC 10.5 seems to include a bugfix for this, but 9.4 does not. Building with GCC 10.5 works. --- Cross.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Cross.toml b/Cross.toml index de4c8eb..352ed78 100644 --- a/Cross.toml +++ b/Cross.toml @@ -4,5 +4,8 @@ default-target = "x86_64-unknown-linux-gnu" [target.x86_64-unknown-linux-gnu] pre-build = [ "dpkg --add-architecture $CROSS_DEB_ARCH", - "apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH" + "apt-get update", + "apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH", + "apt-get install --assume-yes gcc-10:$CROSS_DEB_ARCH", + "update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 60" ]