From: Marcio Barbosa Date: Wed, 26 Sep 2018 03:18:38 +0000 (-0300) Subject: macos: add support for MacOS 10.14 X-Git-Tag: openafs-devel-1_9_0~412 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=72b2670a9e2e3937ed4e47485b9e9fa6953b5444;hp=bd58bb85004a18bb6681ff2b0c13a04e23c4d9c4 macos: add support for MacOS 10.14 This commit introduces the new set of changes / files required to successfully build the OpenAFS source code on OS X 10.14 "Mojave". Change-Id: Ib7cbd531ad6db3340d59e76abdecbe75886a4d5c Reviewed-on: https://gerrit.openafs.org/13348 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk --- diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index f3bb822..c87abde 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -330,7 +330,7 @@ case $AFS_SYSNAME in XLIBS="${LIB_AFSDB} -framework CoreFoundation" ;; - *_darwin_100 | *_darwin_110 | *_darwin_120 | *_darwin_130 | *_darwin_140 | *_darwin_150 | *_darwin_160 | *_darwin_170) + *_darwin_100 | *_darwin_110 | *_darwin_120 | *_darwin_130 | *_darwin_140 | *_darwin_150 | *_darwin_160 | *_darwin_170 | *_darwin_180) AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation" MT_CFLAGS="-D_REENTRANT" MT_LIBS='${XLIBS}' diff --git a/src/cf/sysname.m4 b/src/cf/sysname.m4 index b9a11cb..98f9adb 100644 --- a/src/cf/sysname.m4 +++ b/src/cf/sysname.m4 @@ -174,6 +174,14 @@ else AFS_SYSNAME="x86_darwin_170" OSXSDK="macosx10.13" ;; + x86_64-apple-darwin18.*) + AFS_SYSNAME="x86_darwin_180" + OSXSDK="macosx10.14" + ;; + i?86-apple-darwin18.*) + AFS_SYSNAME="x86_darwin_180" + OSXSDK="macosx10.14" + ;; sparc-sun-solaris2.8) AFS_SYSNAME="sun4x_58" ;; diff --git a/src/config/afs_sysnames.h b/src/config/afs_sysnames.h index dc9e74a..46aaf7a 100644 --- a/src/config/afs_sysnames.h +++ b/src/config/afs_sysnames.h @@ -88,6 +88,9 @@ #define SYS_NAME_ID_x86_darwin_170 535 #define SYS_NAME_ID_amd64_darwin_170 536 #define SYS_NAME_ID_arm_darwin_170 537 +#define SYS_NAME_ID_x86_darwin_180 538 +#define SYS_NAME_ID_amd64_darwin_180 539 +#define SYS_NAME_ID_arm_darwin_180 540 #define SYS_NAME_ID_next_mach20 601 #define SYS_NAME_ID_next_mach30 602 diff --git a/src/config/param.x86_darwin_180.h b/src/config/param.x86_darwin_180.h new file mode 100644 index 0000000..bc671a8 --- /dev/null +++ b/src/config/param.x86_darwin_180.h @@ -0,0 +1,282 @@ +#ifndef UKERNEL +/* This section for kernel libafs compiles only */ + +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#define AFS_ENV 1 +#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ +#define AFS_64BIT_CLIENT 1 +#define AFS_64BIT_IOPS_ENV 1 +#if defined(__ppc__) +#define AFS_PPC_ENV 1 +#elif defined(__i386__) || defined(__amd64__) +#define AFS_X86_ENV 1 +#else +#error Unsupported architecture +#endif +#ifdef __amd64__ +#define AFS_64BITUSERPOINTER_ENV 1 +#endif +#define AFS_64BIT_SIZEOF 1 /* seriously? */ +#include + +#define AFS_DARWIN_ENV +#define AFS_DARWIN70_ENV +#define AFS_DARWIN80_ENV +#define AFS_DARWIN90_ENV +#define AFS_DARWIN100_ENV +#define AFS_DARWIN110_ENV +#define AFS_DARWIN120_ENV +#define AFS_DARWIN130_ENV +#define AFS_DARWIN140_ENV +#define AFS_DARWIN150_ENV +#define AFS_DARWIN160_ENV +#define AFS_DARWIN170_ENV +#define AFS_DARWIN180_ENV +#undef AFS_NONFSTRANS +#define AFS_NONFSTRANS +#define AFS_SYSCALL 230 +#define AFS_NAMEI_ENV 1 +#define DARWIN_REFBASE 3 +#define AFS_WARNUSER_MARINER_ENV 1 +#define AFS_CACHE_VNODE_PATH +#define AFS_NEW_BKG 1 +#define NEED_IOCTL32 + +/* File system entry (used if mount.h doesn't define MOUNT_AFS */ +#define AFS_MOUNT_AFS "afs" + +/* Machine / Operating system information */ +#if defined(__ppc__) +#define sys_ppc_darwin_12 1 +#define sys_ppc_darwin_13 1 +#define sys_ppc_darwin_14 1 +#define sys_ppc_darwin_60 1 +#define sys_ppc_darwin_70 1 +#define sys_ppc_darwin_80 1 +#define sys_ppc_darwin_90 1 +#define sys_ppc_darwin_100 1 +#define SYS_NAME "ppc_darwin_100" +#define SYS_NAME_ID SYS_NAME_ID_ppc_darwin_100 +#define AFSBIG_ENDIAN 1 +#elif defined(__ppc64__) +#define sys_ppc_darwin_12 1 +#define sys_ppc_darwin_13 1 +#define sys_ppc_darwin_14 1 +#define sys_ppc_darwin_60 1 +#define sys_ppc_darwin_70 1 +#define sys_ppc_darwin_80 1 +#define sys_ppc_darwin_90 1 +#define sys_ppc_darwin_100 1 +#define sys_ppc64_darwin_100 1 +#define SYS_NAME "ppc64_darwin_100" +#define SYS_NAME_ID SYS_NAME_ID_ppc64_darwin_100 +#define AFSBIG_ENDIAN 1 +#elif defined(__i386__) +#define sys_x86_darwin_12 1 +#define sys_x86_darwin_13 1 +#define sys_x86_darwin_14 1 +#define sys_x86_darwin_60 1 +#define sys_x86_darwin_70 1 +#define sys_x86_darwin_80 1 +#define sys_x86_darwin_90 1 +#define sys_x86_darwin_100 1 +#define sys_x86_darwin_110 1 +#define sys_x86_darwin_120 1 +#define sys_x86_darwin_130 1 +#define sys_x86_darwin_140 1 +#define sys_x86_darwin_150 1 +#define sys_x86_darwin_160 1 +#define sys_x86_darwin_170 1 +#define sys_x86_darwin_180 1 +#define SYS_NAME "x86_darwin_180" +#define SYS_NAME_ID SYS_NAME_ID_x86_darwin_180 +#define AFSLITTLE_ENDIAN 1 +#elif defined(__amd64__) +#define sys_x86_darwin_12 1 +#define sys_x86_darwin_13 1 +#define sys_x86_darwin_14 1 +#define sys_x86_darwin_60 1 +#define sys_x86_darwin_70 1 +#define sys_x86_darwin_80 1 +#define sys_x86_darwin_90 1 +#define sys_x86_darwin_100 1 +#define sys_amd64_darwin_100 1 +#define sys_amd64_darwin_110 1 +#define sys_amd64_darwin_120 1 +#define sys_amd64_darwin_130 1 +#define sys_amd64_darwin_140 1 +#define sys_amd64_darwin_150 1 +#define sys_amd64_darwin_160 1 +#define sys_amd64_darwin_170 1 +#define sys_amd64_darwin_180 1 +#define SYS_NAME "amd64_darwin_180" +#define SYS_NAME_ID SYS_NAME_ID_amd64_darwin_180 +#define AFSLITTLE_ENDIAN 1 +#else +#error Unsupported architecture +#endif +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ + +#define AFS_GCPAGS 0 +#define RXK_UPCALL_ENV 1 +#define RXK_TIMEDSLEEP_ENV 1 + +#ifdef KERNEL +#undef MACRO_BEGIN +#undef MACRO_END +#include +#define AFS_GLOBAL_SUNLOCK 1 +#define AFS_VFS34 1 /* What is VFS34??? */ +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_resid uio_resid +#define AFS_UIOSYS UIO_SYSSPACE +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES CLBYTES +#define osi_GetTime(x) microtime(x) +#define AFS_KALLOC(x) _MALLOC(x, M_TEMP, M_WAITOK) +#define AFS_KFREE(x,y) _FREE(x,M_TEMP) +#define v_count v_usecount +#define v_vfsp v_mount +#define vfs_bsize mnt_stat.f_bsize +#define vfs_fsid mnt_stat.f_fsid +#define va_nodeid va_fileid +#define vfs_vnodecovered mnt_vnodecovered +#define direct dirent + +#define BIND_8_COMPAT + +#endif +#endif /* AFS_PARAM_H */ + +#else /* !defined(UKERNEL) */ + +/* This section for user space compiles only */ + +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#define AFS_ENV 1 +#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ +#define AFS_64BIT_CLIENT 1 +#if defined(__ppc__) +#define AFS_PPC_ENV 1 +#elif defined(__i386__) || defined(__amd64__) +#define AFS_X86_ENV 1 +#else +#error Unsupported architecture +#endif +#ifdef __amd64__ +#define AFS_64BITUSERPOINTER_ENV 1 +#endif + +#include +#define AFS_USERSPACE_ENV +#define AFS_USR_DARWIN_ENV +#define AFS_USR_DARWIN70_ENV +#define AFS_USR_DARWIN80_ENV +#define AFS_USR_DARWIN90_ENV +#define AFS_USR_DARWIN100_ENV +#define AFS_USR_DARWIN110_ENV +#define AFS_USR_DARWIN120_ENV +#define AFS_USR_DARWIN130_ENV +#define AFS_USR_DARWIN140_ENV +#define AFS_USR_DARWIN150_ENV +#define AFS_USR_DARWIN160_ENV +#define AFS_USR_DARWIN170_ENV +#define AFS_USR_DARWIN180_ENV +#undef AFS_NONFSTRANS +#define AFS_NONFSTRANS +#define AFS_SYSCALL 230 +#define DARWIN_REFBASE 0 +#define AFS_WARNUSER_MARINER_ENV 1 + +/* File system entry (used if mount.h doesn't define MOUNT_AFS */ +#define AFS_MOUNT_AFS "afs" + +/* Machine / Operating system information */ +#if defined(__ppc__) +#define sys_ppc_darwin_12 1 +#define sys_ppc_darwin_13 1 +#define sys_ppc_darwin_14 1 +#define sys_ppc_darwin_60 1 +#define sys_ppc_darwin_70 1 +#define sys_ppc_darwin_80 1 +#define sys_ppc_darwin_90 1 +#define sys_ppc_darwin_100 1 +#define SYS_NAME "ppc_darwin_100" +#define SYS_NAME_ID SYS_NAME_ID_ppc_darwin_100 +#define AFSBIG_ENDIAN 1 +#elif defined(__i386__) +#define sys_x86_darwin_12 1 +#define sys_x86_darwin_13 1 +#define sys_x86_darwin_14 1 +#define sys_x86_darwin_60 1 +#define sys_x86_darwin_70 1 +#define sys_x86_darwin_80 1 +#define sys_x86_darwin_100 1 +#define sys_x86_darwin_110 1 +#define sys_x86_darwin_120 1 +#define sys_x86_darwin_130 1 +#define sys_x64_darwin_140 1 +#define sys_x64_darwin_150 1 +#define sys_x64_darwin_160 1 +#define sys_x64_darwin_170 1 +#define sys_x64_darwin_180 1 +#define SYS_NAME "x86_darwin_180" +#define SYS_NAME_ID SYS_NAME_ID_x86_darwin_180 +#define AFSLITTLE_ENDIAN 1 +#elif defined(__amd64__) +#define sys_x86_darwin_12 1 +#define sys_x86_darwin_13 1 +#define sys_x86_darwin_14 1 +#define sys_x86_darwin_60 1 +#define sys_x86_darwin_70 1 +#define sys_x86_darwin_80 1 +#define sys_x86_darwin_100 1 +#define sys_amd64_darwin_100 1 +#define sys_amd64_darwin_110 1 +#define sys_amd64_darwin_120 1 +#define sys_amd64_darwin_130 1 +#define sys_amd64_darwin_140 1 +#define sys_amd64_darwin_150 1 +#define sys_amd64_darwin_160 1 +#define sys_amd64_darwin_170 1 +#define sys_amd64_darwin_180 1 +#define SYS_NAME "amd64_darwin_180" +#define SYS_NAME_ID SYS_NAME_ID_amd64_darwin_180 +#define AFSLITTLE_ENDIAN 1 +#else +#error Unsupported architecture +#endif +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ + +#define AFS_UIOSYS UIO_SYSSPACE +#define AFS_UIOUSER UIO_USERSPACE + +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ +#define RXK_LISTENER_ENV 1 + +#define AFS_VFS34 1 /* What is VFS34??? */ +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_resid uio_resid +#define AFS_UIOSYS UIO_SYSSPACE +#define AFS_UIOUSER UIO_USERSPACE +#define VATTR_NULL usr_vattr_null + +#define AFS_DIRENT +#ifndef CMSERVERPREF +#define CMSERVERPREF +#endif + +#define BIND_8_COMPAT +#endif /* AFS_PARAM_H */ + +#endif /* !defined(UKERNEL) */ diff --git a/src/libafs/MakefileProto.DARWIN.in b/src/libafs/MakefileProto.DARWIN.in index 555c22d..ef82474 100644 --- a/src/libafs/MakefileProto.DARWIN.in +++ b/src/libafs/MakefileProto.DARWIN.in @@ -59,9 +59,9 @@ OBJ_ppc=$(shell echo "${ARCH_ppc}" | grep -q -w yes && echo "$@.ppc") OBJ_x86=$(shell echo "${ARCH_x86}" | grep -q -w yes && echo "$@.x86") OBJ_amd64=$(shell echo "${ARCH_amd64}" | grep -q -w yes && echo "$@.amd64") - + MODLD=$(CC) -static $(KOPTS_DBUG) -nostdlib $(ARCHFLAGS) -Xlinker -kext - + MODLD=$(CC) -static $(KOPTS_DBUG) -nostdlib $(ARCHFLAGS) @@ -172,10 +172,10 @@ dest_libafs: $(LIBAFSNONFS) $(LIBAFSNONFSDSYM) ; ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS) $(MODLD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS} -lcc_kext - + ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS) $(MODLD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS} -lcc_kext - + ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS) $(MODLD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS} -lcc_kext -Xlinker -kext diff --git a/src/libafs/afs.x86_darwin_180.plist.in b/src/libafs/afs.x86_darwin_180.plist.in new file mode 100644 index 0000000..a138571 --- /dev/null +++ b/src/libafs/afs.x86_darwin_180.plist.in @@ -0,0 +1,33 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + afs + CFBundleIdentifier + org.openafs.filesystems.afs + CFBundleInfoDictionaryVersion + 8.0 + CFBundleName + afs + CFBundlePackageType + KEXT + CFBundleShortVersionString + @MACOS_VERSION@ + CFBundleSignature + ???? + CFBundleVersion + @MACOS_VERSION@ + OSBundleLibraries + + com.apple.kpi.bsd + 8.0.0 + com.apple.kpi.mach + 8.0.0 + com.apple.kpi.libkern + 8.0 + + +