Skip to content

Commit 88e3885

Browse files
authored
freebsd: unbreak module/Makefile.bsd build on 15-CURRENT-arm64
- don't include foreign machine assembly files - reduce diff to FreeBSD module Makefile Discovered in FreeBSD port filesystems/openzfs-kmod Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Martin Matuska <mm@FreeBSD.org> Closes #17219
1 parent 09fc7bb commit 88e3885

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

module/Makefile.bsd

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,25 @@ SRCS+= blake3.c \
9090
blake3_generic.c \
9191
blake3_impl.c
9292

93+
.if ${MACHINE_ARCH} == "aarch64"
9394
#icp/asm-aarch64/blake3
9495
SRCS+= b3_aarch64_sse2.S \
9596
b3_aarch64_sse41.S
97+
.endif
9698

99+
.if ${MACHINE_ARCH} == "powerpc64le"
97100
#icp/asm-ppc64/blake3
98101
SRCS+= b3_ppc64le_sse2.S \
99102
b3_ppc64le_sse41.S
103+
.endif
100104

105+
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
101106
#icp/asm-x86_64/blake3
102107
SRCS+= blake3_avx2.S \
103108
blake3_avx512.S \
104109
blake3_sse2.S \
105110
blake3_sse41.S
111+
.endif
106112

107113
#icp/algs/edonr
108114
SRCS+= edonr.c
@@ -112,23 +118,31 @@ SRCS+= sha256_impl.c \
112118
sha2_generic.c \
113119
sha512_impl.c
114120

121+
.if ${MACHINE_ARCH} == "armv7"
115122
#icp/asm-arm/sha2
116123
SRCS+= sha256-armv7.S \
117124
sha512-armv7.S
125+
.endif
118126

127+
.if ${MACHINE_ARCH} == "aarch64"
119128
#icp/asm-aarch64/sha2
120129
SRCS+= sha256-armv8.S \
121130
sha512-armv8.S
131+
.endif
122132

133+
.if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc64le"
123134
#icp/asm-ppc64/sha2
124135
SRCS+= sha256-p8.S \
125136
sha256-ppc.S \
126137
sha512-p8.S \
127138
sha512-ppc.S
139+
.endif
128140

141+
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
129142
#icp/asm-x86_64/sha2
130143
SRCS+= sha256-x86_64.S \
131144
sha512-x86_64.S
145+
.endif
132146

133147
#lua
134148
SRCS+= lapi.c \
@@ -505,7 +519,7 @@ CFLAGS.zstd_lazy.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGIC
505519
CFLAGS.zstd_ldm.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
506520
CFLAGS.zstd_opt.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
507521

508-
.if ${MACHINE_CPUARCH} == "aarch64"
522+
.if ${MACHINE_ARCH} == "aarch64"
509523
__ZFS_ZSTD_AARCH64_FLAGS= -include ${SRCDIR}/zstd/include/aarch64_compat.h
510524
CFLAGS.zstd.c+= ${__ZFS_ZSTD_AARCH64_FLAGS}
511525
CFLAGS.entropy_common.c+= ${__ZFS_ZSTD_AARCH64_FLAGS}

0 commit comments

Comments
 (0)