Skip to content

Commit 0cfd940

Browse files
mmatuskatonyhutter
authored andcommitted
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 <[email protected]> Reviewed-by: Tino Reichardt <[email protected]> Signed-off-by: Martin Matuska <[email protected]> Closes #17219
1 parent 3a2b089 commit 0cfd940

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
@@ -93,42 +93,56 @@ SRCS+= blake3.c \
9393
blake3_generic.c \
9494
blake3_impl.c
9595

96+
.if ${MACHINE_ARCH} == "aarch64"
9697
#icp/asm-aarch64/blake3
9798
SRCS+= b3_aarch64_sse2.S \
9899
b3_aarch64_sse41.S
100+
.endif
99101

102+
.if ${MACHINE_ARCH} == "powerpc64le"
100103
#icp/asm-ppc64/blake3
101104
SRCS+= b3_ppc64le_sse2.S \
102105
b3_ppc64le_sse41.S
106+
.endif
103107

108+
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
104109
#icp/asm-x86_64/blake3
105110
SRCS+= blake3_avx2.S \
106111
blake3_avx512.S \
107112
blake3_sse2.S \
108113
blake3_sse41.S
114+
.endif
109115

110116
#icp/algs/sha2
111117
SRCS+= sha2_generic.c \
112118
sha256_impl.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
sha512-p8.S \
126137
sha256-ppc.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 \
@@ -496,7 +510,7 @@ CFLAGS.zstd_lazy.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGIC
496510
CFLAGS.zstd_ldm.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
497511
CFLAGS.zstd_opt.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
498512

499-
.if ${MACHINE_CPUARCH} == "aarch64"
513+
.if ${MACHINE_ARCH} == "aarch64"
500514
__ZFS_ZSTD_AARCH64_FLAGS= -include ${SRCDIR}/zstd/include/aarch64_compat.h
501515
CFLAGS.zstd.c+= ${__ZFS_ZSTD_AARCH64_FLAGS}
502516
CFLAGS.entropy_common.c+= ${__ZFS_ZSTD_AARCH64_FLAGS}

0 commit comments

Comments
 (0)