From d6d2554182ca7f5f97b7611903d7790efdb592af Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Thu, 21 Sep 2023 13:23:59 +0300 Subject: [PATCH 1/2] ci/debian: don't install libc6-dev-ARCH-cross packages There is no need to manually install libc6-dev-ARCH-cross packages. Corresponding target arch packages will be pulled out via the dependency of library dev packages. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov --- ci/debian.cross-compile.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ci/debian.cross-compile.sh b/ci/debian.cross-compile.sh index 810fad3..3d392bb 100755 --- a/ci/debian.cross-compile.sh +++ b/ci/debian.cross-compile.sh @@ -16,12 +16,12 @@ if [ -z "$ARCH" ]; then fi case "$ARCH" in - armel) PKGS_CC="gcc-arm-linux-gnueabi libc6-dev-${ARCH}-cross";; - arm64) PKGS_CC="gcc-aarch64-linux-gnu libc6-dev-${ARCH}-cross";; - ppc64el) PKGS_CC="gcc-powerpc64le-linux-gnu libc6-dev-${ARCH}-cross";; + armel) PKGS_CC="gcc-arm-linux-gnueabi";; + arm64) PKGS_CC="gcc-aarch64-linux-gnu";; + ppc64el) PKGS_CC="gcc-powerpc64le-linux-gnu";; # TODO: libraries for riscv? - #riscv64) PKGS_CC="gcc-riscv64-linux-gnu libc6-dev-${ARCH}-cross";; - s390x) PKGS_CC="gcc-${ARCH}-linux-gnu libc6-dev-${ARCH}-cross";; + #riscv64) PKGS_CC="gcc-riscv64-linux-gnu";; + s390x) PKGS_CC="gcc-${ARCH}-linux-gnu";; *) echo "unsupported arch: '$ARCH'!" >&2; exit 1;; esac From 35836467e479695e4ec944a877870e65b0ce2fd6 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Thu, 21 Sep 2023 13:26:29 +0300 Subject: [PATCH 2/2] c/debian: use dpkg-architecture to detect gcc-cross package name Rather than specifying GCC packages manually, generate package name using dpkg-architecture. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov --- ci/debian.cross-compile.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/ci/debian.cross-compile.sh b/ci/debian.cross-compile.sh index 3d392bb..de01ea2 100755 --- a/ci/debian.cross-compile.sh +++ b/ci/debian.cross-compile.sh @@ -15,16 +15,6 @@ if [ -z "$ARCH" ]; then exit 1 fi -case "$ARCH" in - armel) PKGS_CC="gcc-arm-linux-gnueabi";; - arm64) PKGS_CC="gcc-aarch64-linux-gnu";; - ppc64el) PKGS_CC="gcc-powerpc64le-linux-gnu";; - # TODO: libraries for riscv? - #riscv64) PKGS_CC="gcc-riscv64-linux-gnu";; - s390x) PKGS_CC="gcc-${ARCH}-linux-gnu";; - *) echo "unsupported arch: '$ARCH'!" >&2; exit 1;; -esac - dpkg --add-architecture $ARCH apt update @@ -32,6 +22,6 @@ apt install -y --no-install-recommends \ libftdi-dev:${ARCH} \ libudev-dev:${ARCH} \ libyaml-dev:${ARCH} \ - $PKGS_CC + gcc-`dpkg-architecture -a ${ARCH} -q DEB_TARGET_GNU_TYPE` echo "Install finished: $0"