]> git.proxmox.com Git - mirror_zfs-debian.git/blob - debian/patches/1002-fix-mips-build.patch
Merge tag 'upstream/0.7.2'
[mirror_zfs-debian.git] / debian / patches / 1002-fix-mips-build.patch
1 Description: Fix build problem on mips*
2 Make sure required defines are set on mips.
3 Author: YunQiang Su <wzssyqa@gmail.com>
4 Bug-Debian: https://bugs.debian.org/824190
5 Bug: https://github.com/zfsonlinux/zfs/pull/4712
6 Reviewed-By: Petter Reinholdtsen <pere@hungry.com>
7 Last-Update: 2016-05-25
8 Applied-upstream: https://github.com/zfsonlinux/zfs/commit/2493dca54e18b24bcd8b7ff5432f4dc51dddc472
9
10 Index: zfs-linux-0.6.5.6/lib/libspl/include/sys/isa_defs.h
11 ===================================================================
12 --- zfs-linux-0.6.5.6.orig/lib/libspl/include/sys/isa_defs.h
13 +++ zfs-linux-0.6.5.6/lib/libspl/include/sys/isa_defs.h
14 @@ -172,7 +172,24 @@ extern "C" {
15 #define _BIG_ENDIAN
16 #define _SUNOS_VTOC_16
17
18 -#else /* Currently x86_64, i386, arm, powerpc, s390, and sparc are supported */
19 +/* MIPS arch specific defines */
20 +#elif defined(__mips__)
21 +
22 +#if defined(__MIPSEB__)
23 +#define _BIG_ENDIAN
24 +#elif defined(__MIPSEL__)
25 +#define _LITTLE_ENDIAN
26 +#else
27 +#error MIPS no endian specified
28 +#endif
29 +
30 +#ifndef _LP64
31 +#define _ILP32
32 +#endif
33 +
34 +#define _SUNOS_VTOC_16
35 +
36 +#else /* Currently x86_64, i386, arm, powerpc, s390, sparc and mips are supported */
37 #error "Unsupported ISA type"
38 #endif
39
40 Index: zfs-linux-0.6.5.6/lib/libefi/rdwr_efi.c
41 ===================================================================
42 --- zfs-linux-0.6.5.6.orig/lib/libefi/rdwr_efi.c
43 +++ zfs-linux-0.6.5.6/lib/libefi/rdwr_efi.c
44 @@ -88,7 +88,8 @@ struct dk_map2 default_vtoc_map[NDKMAP]
45 #if defined(_SUNOS_VTOC_16)
46
47 #if defined(i386) || defined(__amd64) || defined(__arm) || \
48 - defined(__powerpc) || defined(__sparc) || defined(__s390__)
49 + defined(__powerpc) || defined(__sparc) || defined(__s390__) || \
50 + defined(__mips__)
51 { V_BOOT, V_UNMNT }, /* i - 8 */
52 { V_ALTSCTR, 0 }, /* j - 9 */
53