From 1c50377f9e2ff6bb935e593db1c24c4b07896123 Mon Sep 17 00:00:00 2001 From: yzewei Date: Thu, 21 Dec 2023 15:54:45 +0800 Subject: [PATCH] update archutil/Dockerfile images from bullseye to trixie Signed-off-by: yzewei --- util/archutil/Dockerfile | 4 +--- util/archutil/detect.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/util/archutil/Dockerfile b/util/archutil/Dockerfile index 6fd22a7e3c2a5..8ecbbcb227175 100644 --- a/util/archutil/Dockerfile +++ b/util/archutil/Dockerfile @@ -9,10 +9,8 @@ RUN apt-get update && apt-get --no-install-recommends install -y \ binutils-powerpc64le-linux-gnu \ binutils-mips64el-linux-gnuabi64 \ binutils-mips64-linux-gnuabi64 \ + binutils-loongarch64-linux-gnu \ wget xz-utils -RUN wget http://ftp.loongnix.cn/toolchain/gcc/release/loongarch/gcc8/loongson-gnu-toolchain-8.3-x86_64-loongarch64-linux-gnu-rc1.2.tar.xz \ - && tar -C /usr/local -xf loongson-gnu-toolchain-8.3-x86_64-loongarch64-linux-gnu-rc1.2.tar.xz && rm loongson-gnu-toolchain-8.3-x86_64-loongarch64-linux-gnu-rc1.2.tar.xz -ENV PATH=/usr/local/loongson-gnu-toolchain-8.3-x86_64-loongarch64-linux-gnu-rc1.2/bin:$PATH WORKDIR /src diff --git a/util/archutil/detect.go b/util/archutil/detect.go index b36726c92f15a..5808333f91b5f 100644 --- a/util/archutil/detect.go +++ b/util/archutil/detect.go @@ -79,10 +79,10 @@ func SupportedPlatforms(noCache bool) []ocispecs.Platform { } } if p := "loong64"; def.Architecture != p { - if _, err := loong64Supported(); err == nil { - arr = append(arr, linux(p)) - } - } + if _, err := loong64Supported(); err == nil { + arr = append(arr, linux(p)) + } + } if p := "arm"; def.Architecture != p { if _, err := armSupported(); err == nil { p := linux("arm") @@ -150,10 +150,10 @@ func WarnIfUnsupported(pfs []ocispecs.Platform) { } } if p.Architecture == "loong64" { - if _, err := loong64Supported(); err != nil { - printPlatformWarning(p, err) - } - } + if _, err := loong64Supported(); err != nil { + printPlatformWarning(p, err) + } + } if p.Architecture == "arm" { if _, err := armSupported(); err != nil { printPlatformWarning(p, err)