From 65aaa0f87048f78a3f69c4ec0ad03723a2354fa7 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Mon, 24 Jun 2024 17:39:54 +0300 Subject: [PATCH] CI: Workaround buggy config.guess on Ubuntu 22.04LTS and 24.04LTS Check for the wrong triplet from config.guess and override it with the --build option on the configure command line. Then i386 assembly autodetection will work. These Ubuntu versions (and as of writing, also Debian unstable) ship config.guess version 2022-01-09 which contains a bug that was fixed in version 2022-05-08. It results in a wrong configure triplet when using CC="gcc -m32" to build i386 binaries. Upstream fix: https://git.savannah.gnu.org/cgit/config.git/commit/?id=f56a7140386d08a531bcfd444d632b28c61a6329 More information: https://mail.gnu.org/archive/html/config-patches/2022-05/msg00003.html (cherry picked from commit 1bf83cded2955282fe1a868f08c83d4e5d6dca4a) --- build-aux/ci_build.bash | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build-aux/ci_build.bash b/build-aux/ci_build.bash index 8e7b2d5d..b471dd78 100755 --- a/build-aux/ci_build.bash +++ b/build-aux/ci_build.bash @@ -217,6 +217,15 @@ then add_extra_option "$CLMUL" "" "--disable-clmul-crc" add_extra_option "$SANDBOX" "" "--enable-sandbox=no" + # Workaround a bug in too old config.guess. Version with + # timestamp='2022-05-08' would be needed but the autotools-dev + # package has 2022-01-09 in Ubuntu 22.04LTS and 24.04LTS. The + # bug breaks i386 assembler usage autodetection. + if "$SRC_DIR/build-aux/config.guess" | grep -q x86_64-pc-linux-gnux32 + then + EXTRA_OPTIONS="$EXTRA_OPTIONS --build=i686-pc-linux-gnu" + fi + # Run configure script "$SRC_DIR"/configure --enable-werror --enable-checks="$CHECK_TYPE" $EXTRA_OPTIONS --config-cache