FreeBSD: Fixes required to build ZFS on PowerPC

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #10622
This commit is contained in:
Matthew Macy
2020-07-25 11:00:23 -07:00
committed by GitHub
parent d364de7a89
commit f5b189f937
3 changed files with 18 additions and 3 deletions
+15
View File
@@ -542,6 +542,21 @@ extern "C" {
#define _BIT_FIELDS_LTOH #define _BIT_FIELDS_LTOH
#endif #endif
#if !defined(__powerpc)
#define __powerpc
#endif
#if defined(__powerpc64__)
#define _LONG_LONG_ALIGNMENT 8
#define _MULTI_DATAMODEL
#else
#define _LONG_LONG_ALIGNMENT 4
#endif
#define _LONG_LONG_ALIGNMENT_32 4
#define _ALIGNMENT_REQUIRED 1
#define _SUNOS_VTOC_16 1
/* /*
* The following set of definitions characterize the Solaris on SPARC systems. * The following set of definitions characterize the Solaris on SPARC systems.
* *
+2 -2
View File
@@ -464,7 +464,7 @@ zfs_avx512vbmi_available(void)
#include <signal.h> #include <signal.h>
#include <setjmp.h> #include <setjmp.h>
#ifdef __ALTIVEC__ #if defined(__ALTIVEC__) && !defined(__FreeBSD__)
static jmp_buf env; static jmp_buf env;
static void sigillhandler(int x) static void sigillhandler(int x)
{ {
@@ -476,7 +476,7 @@ static inline boolean_t
zfs_altivec_available(void) zfs_altivec_available(void)
{ {
boolean_t has_altivec = B_FALSE; boolean_t has_altivec = B_FALSE;
#ifdef __ALTIVEC__ #if defined(__ALTIVEC__) && !defined(__FreeBSD__)
sighandler_t savesig; sighandler_t savesig;
savesig = signal(SIGILL, sigillhandler); savesig = signal(SIGILL, sigillhandler);
if (setjmp(env)) { if (setjmp(env)) {
+1 -1
View File
@@ -65,7 +65,7 @@ const raidz_impl_ops_t *raidz_all_maths[] = {
&vdev_raidz_aarch64_neon_impl, &vdev_raidz_aarch64_neon_impl,
&vdev_raidz_aarch64_neonx2_impl, &vdev_raidz_aarch64_neonx2_impl,
#endif #endif
#if defined(__powerpc__) #if defined(__powerpc__) && defined(__altivec__)
&vdev_raidz_powerpc_altivec_impl, &vdev_raidz_powerpc_altivec_impl,
#endif #endif
}; };