View | Details | Raw Unified | Return to bug 239870 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (+5 lines)
Lines 30-36 Link Here
30
TEST_TARGET=	check
30
TEST_TARGET=	check
31
31
32
OPTIONS_DEFINE=	DOCS
32
OPTIONS_DEFINE=	DOCS
33
OPTIONS_DEFINE_powerpc64=	VSX
33
34
35
VSX_CFLAGS=	-mvsx
36
VSX_CONFIGURE_ENABLE=	vsx
37
VSX_DESC=	Enable VSX intrinsics support
38
34
.include <bsd.port.options.mk>
39
.include <bsd.port.options.mk>
35
40
36
.if ${ARCH} == "i386"
41
.if ${ARCH} == "i386"
(-)files/patch-src_libFLAC_cpu.c (+24 lines)
Line 0 Link Here
1
--- src/libFLAC/cpu.c.orig	2019-08-15 00:05:19 UTC
2
+++ src/libFLAC/cpu.c
3
@@ -245,11 +245,21 @@ ppc_cpu_info (FLAC__CPUInfo *info)
4
 #define PPC_FEATURE2_ARCH_2_07		0x80000000
5
 #endif
6
 
7
+#ifdef __linux__
8
 	if (getauxval(AT_HWCAP2) & PPC_FEATURE2_ARCH_3_00) {
9
 		info->ppc.arch_3_00 = true;
10
 	} else if (getauxval(AT_HWCAP2) & PPC_FEATURE2_ARCH_2_07) {
11
 		info->ppc.arch_2_07 = true;
12
 	}
13
+#elif defined(__FreeBSD__)
14
+	long hwcaps;
15
+	elf_aux_info(AT_HWCAP2, &hwcaps, sizeof(hwcaps));
16
+	if (hwcaps & PPC_FEATURE2_ARCH_3_00) {
17
+		info->ppc.arch_3_00 = true;
18
+	} else if (hwcaps & PPC_FEATURE2_ARCH_2_07) {
19
+		info->ppc.arch_2_07 = true;
20
+	}
21
+#endif
22
 #else
23
 	info->ppc.arch_2_07 = false;
24
 	info->ppc.arch_3_00 = false;

Return to bug 239870