diff -Nru btrfs-progs-6.2/debian/changelog btrfs-progs-6.2/debian/changelog --- btrfs-progs-6.2/debian/changelog 2023-02-28 23:17:49.000000000 +0000 +++ btrfs-progs-6.2/debian/changelog 2023-06-14 10:06:50.000000000 +0000 @@ -1,3 +1,15 @@ +btrfs-progs (6.2-1ubuntu0.1~rebuild2) lunar; urgency=medium + + * Another patch that seems to be needed. + + -- Michael Hudson-Doyle Wed, 14 Jun 2023 22:06:50 +1200 + +btrfs-progs (6.2-1ubuntu0.1~rebuild1) lunar; urgency=medium + + * Backport patch from upstream fixing failure with -march=x86-64-v3. + + -- Michael Hudson-Doyle Wed, 14 Jun 2023 16:11:03 +1200 + btrfs-progs (6.2-1) unstable; urgency=medium * New upstream release. diff -Nru btrfs-progs-6.2/debian/control btrfs-progs-6.2/debian/control --- btrfs-progs-6.2/debian/control 2023-02-28 23:16:51.000000000 +0000 +++ btrfs-progs-6.2/debian/control 2023-06-14 04:11:52.000000000 +0000 @@ -1,7 +1,8 @@ Source: btrfs-progs Section: admin Priority: optional -Maintainer: Adam Borowski +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Adam Borowski Build-Depends: debhelper-compat (= 13), libext2fs-dev, pkg-config, diff -Nru btrfs-progs-6.2/debian/patches/0da635fd1b6ab491e2f4dd6668aa7906b675d61f.patch btrfs-progs-6.2/debian/patches/0da635fd1b6ab491e2f4dd6668aa7906b675d61f.patch --- btrfs-progs-6.2/debian/patches/0da635fd1b6ab491e2f4dd6668aa7906b675d61f.patch 1970-01-01 00:00:00.000000000 +0000 +++ btrfs-progs-6.2/debian/patches/0da635fd1b6ab491e2f4dd6668aa7906b675d61f.patch 2023-06-14 04:09:39.000000000 +0000 @@ -0,0 +1,75 @@ +From 0da635fd1b6ab491e2f4dd6668aa7906b675d61f Mon Sep 17 00:00:00 2001 +From: Tino Mai +Date: Sun, 5 Mar 2023 18:15:52 +0100 +Subject: [PATCH] btrfs-progs: crypto: fix SSE2/SSE4.1 detection of BLAKE2 + +On recent x86-64 system with march=native|| gcc/clang will automatically define all the available vector +extensions macros. crypto/blake2-config.h then correctly set all the +HAVE_ macros. + +crypto/blake2-round.h then checks the HAVE_ macros for +including further headers: + + #if defined(HAVE_SSE41) + #include "blake2b-load-sse41.h" + #else + #include "blake2b-load-sse2.h" + #endif + +which is wrong. On recent systems it always results in including +blake2b-load-sse41.h. crypto/blake2-round.h itself is included by +crypto/blake2b-sse2.c and now we have a SSE2/SSE4.1 code mixing +resulting in the incompatible type for argument build errors described +in #589. + +The idea is to remove the lines above from crypto/blake2-round.h and put +the includes directly into crypto/blake2b-sse2.c and +crypto/blake2b-sse41.c respectively. + +Note this slightly diverges from the upstream BLAKE2 sources. + +Pull-request: #591 +Author: Tino Mai +Signed-off-by: David Sterba +--- + crypto/blake2b-round.h | 6 ------ + crypto/blake2b-sse2.c | 1 + + crypto/blake2b-sse41.c | 1 + + 3 files changed, 2 insertions(+), 6 deletions(-) + +--- a/crypto/blake2b-round.h ++++ b/crypto/blake2b-round.h +@@ -136,12 +136,6 @@ + + #endif + +-#if defined(HAVE_SSE41) +-#include "blake2b-load-sse41.h" +-#else +-#include "blake2b-load-sse2.h" +-#endif +- + #define ROUND(r) \ + LOAD_MSG_ ##r ##_1(b0, b1); \ + G1(row1l,row2l,row3l,row4l,row1h,row2h,row3h,row4h,b0,b1); \ +--- a/crypto/blake2b-sse2.c ++++ b/crypto/blake2b-sse2.c +@@ -27,6 +27,7 @@ + #include + #endif + ++#include "blake2b-load-sse2.h" + #include "blake2b-round.h" + + static const uint64_t blake2b_IV[8] = +--- a/crypto/blake2b-sse41.c ++++ b/crypto/blake2b-sse41.c +@@ -34,6 +34,7 @@ + #include + #endif + ++#include "blake2b-load-sse41.h" + #include "blake2b-round.h" + + static const uint64_t blake2b_IV[8] = diff -Nru btrfs-progs-6.2/debian/patches/another-fix.patch btrfs-progs-6.2/debian/patches/another-fix.patch --- btrfs-progs-6.2/debian/patches/another-fix.patch 1970-01-01 00:00:00.000000000 +0000 +++ btrfs-progs-6.2/debian/patches/another-fix.patch 2023-06-14 10:06:46.000000000 +0000 @@ -0,0 +1,10 @@ +--- a/crypto/blake2b-sse2.c ++++ b/crypto/blake2b-sse2.c +@@ -26,6 +26,7 @@ + #if defined(HAVE_XOP) + #include + #endif ++#include + + #include "blake2b-load-sse2.h" + #include "blake2b-round.h" diff -Nru btrfs-progs-6.2/debian/patches/series btrfs-progs-6.2/debian/patches/series --- btrfs-progs-6.2/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ btrfs-progs-6.2/debian/patches/series 2023-06-14 10:06:29.000000000 +0000 @@ -0,0 +1,2 @@ +0da635fd1b6ab491e2f4dd6668aa7906b675d61f.patch +another-fix.patch