Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0C851CD6E64 for ; Wed, 3 Jun 2026 08:53:53 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1325896.1591258 (Exim 4.92) (envelope-from ) id 1wUhM6-0003OD-9J; Wed, 03 Jun 2026 08:53:42 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1325896.1591258; Wed, 03 Jun 2026 08:53:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wUhM6-0003Nc-2z; Wed, 03 Jun 2026 08:53:42 +0000 Received: by outflank-mailman (input) for mailman id 1325896; Wed, 03 Jun 2026 08:53:40 +0000 Received: from mx.expurgate.net ([194.145.224.20]) by lists.xenproject.org with esmtp (Exim 4.92) id 1wUhM4-0003L5-Bh for xen-devel@lists.xenproject.org; Wed, 03 Jun 2026 08:53:40 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wUhM3-006GVP-OU for xen-devel@lists.xenproject.org; Wed, 03 Jun 2026 10:53:39 +0200 Received: from [10.42.69.10] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a1feb8e-e002-0a2a0a5209dd-0a2a450ac73c-26 for ; Wed, 03 Jun 2026 10:53:39 +0200 Received: from [209.85.128.45] (helo=mail-wm1-f45.google.com) by tlsNG-4011c0.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 6a1feb93-56b3-0a2a450a0019-d155802da550-3 for ; Wed, 03 Jun 2026 10:53:39 +0200 Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-490b3e03939so3652785e9.1 for ; Wed, 03 Jun 2026 01:53:39 -0700 (PDT) Received: from localhost.localdomain (host-78-146-242-105.as13285.net. [78.146.242.105]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490b7c6b966sm24070335e9.2.2026.06.03.01.53.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2026 01:53:38 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=google header.d=citrix.com header.i="@citrix.com" header.h="Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1780476819; x=1781081619; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=w38Yjl39w+6P4RkuP/+W/4L2yeNf72EBMIuJEUD/P7o=; b=R9bwjgl7k1Xl5kEe1Q6UPbX2RhhBioOCLWyOXTZZn/zi76FHc99LYcR49+wIuX1W8q rA1B3ARTsQcvBDhhzitKUt+HmbWRA528TRAEkbYse5fPTbyTwRkFZ6JnsapKeOkzXamf WinV+Y2+hpWSuSkH90h2SPJabNQB/6w2Bt1hM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780476819; x=1781081619; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=w38Yjl39w+6P4RkuP/+W/4L2yeNf72EBMIuJEUD/P7o=; b=WIWkHERV33QAV1EnILeqGrP+PugI7OyUJI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17b1804b1-490b614df8dmr29300895e9.13.1780476818608; Wed, 03 Jun 2026 01:53:38 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Anthony PERARD , Juergen Gross , Oleksii Kurochko Subject: [PATCH 1/2] tools/configure: Detect the presence of liblz4 Date: Wed, 3 Jun 2026 09:53:30 +0100 Message-Id: <20260603085331.2704108-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20260603085331.2704108-1-andrew.cooper3@citrix.com> References: <20260603085331.2704108-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-purgate-ID: tlsNG-4011c0/1780476819-70F618B7-EB8F556F/10/73395122804 X-purgate-type: spam X-purgate-size: 5741 As with other compression libraries, group liblz4 into ZLIB_{CFLAGS,LIBS}. Add the packages to the Debian Trixie build containers for coverage. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Juergen Gross CC: Oleksii Kurochko Rebuild the containers when pushed. --- automation/build/debian/13-arm64v8.dockerfile | 1 + automation/build/debian/13-x86_64.dockerfile | 1 + tools/configure | 79 +++++++++++++++++++ tools/configure.ac | 4 + 4 files changed, 85 insertions(+) diff --git a/automation/build/debian/13-arm64v8.dockerfile b/automation/build/debian/13-arm64v8.dockerfile index b9062ee8b443..ee9bb841eb92 100644 --- a/automation/build/debian/13-arm64v8.dockerfile +++ b/automation/build/debian/13-arm64v8.dockerfile @@ -28,6 +28,7 @@ RUN <&6; } ZLIB_LIBS="$ZLIB_LIBS $libzstd_LIBS" fi +pkg_failed=no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5 +printf %s "checking for liblz4... " >&6; } + +if test -n "$liblz4_CFLAGS"; then + pkg_cv_liblz4_CFLAGS="$liblz4_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5 + ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_liblz4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$liblz4_LIBS"; then + pkg_cv_liblz4_LIBS="$liblz4_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5 + ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_liblz4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + liblz4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1` + else + liblz4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$liblz4_PKG_ERRORS" >&5 + + true +elif test $pkg_failed = untried; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + true +else + liblz4_CFLAGS=$pkg_cv_liblz4_CFLAGS + liblz4_LIBS=$pkg_cv_liblz4_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ZLIB_CFLAGS="$ZLIB_CFLAGS -DHAVE_LZ4 $liblz4_CFLAGS" + ZLIB_LIBS="$ZLIB_LIBS $liblz4_LIBS" +fi + ac_fn_c_check_header_compile "$LINENO" "ext2fs/ext2fs.h" "ac_cv_header_ext2fs_ext2fs_h" "$ac_includes_default" diff --git a/tools/configure.ac b/tools/configure.ac index ecd45e782eb8..74b9f56025cb 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -403,6 +403,10 @@ PKG_CHECK_MODULES([libzstd], [libzstd], [ZLIB_CFLAGS="$ZLIB_CFLAGS -DHAVE_ZSTD $libzstd_CFLAGS" ZLIB_LIBS="$ZLIB_LIBS $libzstd_LIBS"], [true]) +PKG_CHECK_MODULES([liblz4], [liblz4], + [ZLIB_CFLAGS="$ZLIB_CFLAGS -DHAVE_LZ4 $liblz4_CFLAGS" + ZLIB_LIBS="$ZLIB_LIBS $liblz4_LIBS"], + [true]) AC_SUBST([ZLIB_CFLAGS]) AC_SUBST([ZLIB_LIBS]) AX_CHECK_EXTFS -- 2.39.5