From 0ace22fc24b6d65ba8e8d263dde27ed228842e6b Mon Sep 17 00:00:00 2001 From: MXWXZ Date: Sat, 31 Aug 2024 03:31:44 +0800 Subject: [PATCH] fix gcc version error --- Cross.toml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Cross.toml b/Cross.toml index 7611bcc..d5ebb01 100644 --- a/Cross.toml +++ b/Cross.toml @@ -1,5 +1,15 @@ +[target.x86_64-unknown-linux-gnu] +pre-build = [ + "apt-get update && apt-get remove -y gcc g++ && apt-get install -y gcc-10 g++-10", + "ln -s /usr/bin/gcc-10 /usr/bin/gcc", + "ln -s /usr/bin/g++-10 /usr/bin/g++", +] + [target.i686-unknown-linux-gnu] pre-build = [ + "apt-get update && apt-get remove -y gcc g++ && apt-get install -y gcc-10 g++-10", + "ln -s /usr/bin/gcc-10 /usr/bin/gcc", + "ln -s /usr/bin/g++-10 /usr/bin/g++", "apt-get update && apt-get install --assume-yes unzip", "curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v27.3/protoc-27.3-linux-x86_64.zip", "unzip protoc-27.3-linux-x86_64.zip -d $HOME/.local", @@ -9,6 +19,9 @@ pre-build = [ [target.aarch64-unknown-linux-gnu] pre-build = [ + "apt-get update && apt-get remove -y gcc g++ && apt-get install -y gcc-10 g++-10", + "ln -s /usr/bin/gcc-10 /usr/bin/gcc", + "ln -s /usr/bin/g++-10 /usr/bin/g++", "apt-get update && apt-get install --assume-yes unzip", "curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v27.3/protoc-27.3-linux-x86_64.zip", "unzip protoc-27.3-linux-x86_64.zip -d $HOME/.local",