summaryrefslogtreecommitdiff
path: root/sys-fs/zfs-kmod/files/2.0.0_rc1-U__BMI__.patch
blob: 9e9a007c3002c8aae1d230364e6c640681dd5839 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 81a3970fca5759499effc3131e59c9bd8f446cc9 Mon Sep 17 00:00:00 2001
From: Georgy Yakovlev <gyakovlev@gentoo.org>
Date: Wed, 26 Aug 2020 16:02:48 -0700
Subject: [PATCH] module/zstd: pass -U__BMI__

Closes: https://github.com/openzfs/zfs/issues/10758
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
---
 module/zstd/Makefile.in | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/module/zstd/Makefile.in b/module/zstd/Makefile.in
index eea749ea8..bfceca920 100644
--- a/module/zstd/Makefile.in
+++ b/module/zstd/Makefile.in
@@ -20,6 +20,10 @@ ccflags-y += -O3
 # Set it for other compilers, too.
 $(obj)/lib/zstd.o: c_flags += -fno-tree-vectorize
 
+# SSE register return with SSE disabled if -march=znverX is passed
+# https://github.com/openzfs/zfs/issues/10758
+$(obj)/lib/zstd.o: c_flags += -U__BMI__
+
 # Quiet warnings about frame size due to unused code in unmodified zstd lib
 $(obj)/lib/zstd.o: c_flags += -Wframe-larger-than=20480
 
-- 
2.28.0