From 403dfd677bfa475e1746fab6c24a4c19a4c5f026 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Tue, 25 Oct 2022 13:25:33 -0500 Subject: [PATCH] FBSD: Build support for FreeBSD 13 Add sysnames and param.h files for FreeBSD 13.0 and 13.1. Note that our param.h does differ from the FreeBSD 12 param.h, in that AFS_64BITUSERPOINTER_ENV is defined for both UKERNEL and non-UKERNEL. Otherwise, afs_pointer_to_int() causes warnings when building UKERNEL (due to newer clang): .../src/afs/afs_icl.c:680:39: error: cast to smaller integer type 'afs_uint32' (aka 'unsigned int') from 'pthread_t' (aka 'struct pthread *') [-Werror,-Wpointer-to-int-cast] ICL_APPENDINT32(logp, (afs_int32) osi_ThreadUnique()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ .../src/afs/afs_osi.h:201:28: note: expanded from macro 'osi_ThreadUnique' ^ .../src/afs/UKERNEL/sysincludes.h:230:30: note: expanded from macro 'osi_getpid' ^ .../include/afs/stds.h:282:37: note: expanded from macro 'afs_pointer_to_int' ^ .../src/afs/afs_icl.c:523:41: note: expanded from macro 'ICL_APPENDINT32' (lp)->datap[(lp)->firstFree] = (x); \ ^ Change-Id: I525c2df5981427d3ad1105030331c06fb7a59d78 Reviewed-on: https://gerrit.openafs.org/15160 Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Tested-by: BuildBot --- src/config/afs_sysnames.h | 2 + src/config/param.amd64_fbsd_130.h | 58 +++++++++++++++++++++++++++++ src/config/param.amd64_fbsd_131.h | 61 +++++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 src/config/param.amd64_fbsd_130.h create mode 100644 src/config/param.amd64_fbsd_131.h diff --git a/src/config/afs_sysnames.h b/src/config/afs_sysnames.h index 196a5d9f2f..ef298cbfbd 100644 --- a/src/config/afs_sysnames.h +++ b/src/config/afs_sysnames.h @@ -376,6 +376,8 @@ #define SYS_NAME_ID_amd64_fbsd_121 3061 #define SYS_NAME_ID_amd64_fbsd_122 3062 #define SYS_NAME_ID_amd64_fbsd_123 3063 +#define SYS_NAME_ID_amd64_fbsd_130 3070 +#define SYS_NAME_ID_amd64_fbsd_131 3071 #define SYS_NAME_ID_amd64_w2k 3400 diff --git a/src/config/param.amd64_fbsd_130.h b/src/config/param.amd64_fbsd_130.h new file mode 100644 index 0000000000..365993b204 --- /dev/null +++ b/src/config/param.amd64_fbsd_130.h @@ -0,0 +1,58 @@ +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +/* Machine / Operating system information */ +#define SYS_NAME "amd64_fbsd_130" +#define SYS_NAME_ID SYS_NAME_ID_amd64_fbsd_130 + +#define AFS_64BITPOINTER_ENV 1 +#define AFS_64BITUSERPOINTER_ENV 1 + +#ifndef UKERNEL +/* This section for kernel libafs compiles only */ + +#define AFS_FBSD101_ENV 1 +#define AFS_FBSD102_ENV 1 +#define AFS_FBSD103_ENV 1 +#define AFS_FBSD104_ENV 1 +#define AFS_FBSD110_ENV 1 +#define AFS_FBSD111_ENV 1 +#define AFS_FBSD120_ENV 1 +#define AFS_FBSD121_ENV 1 +#define AFS_FBSD122_ENV 1 +#define AFS_FBSD123_ENV 1 +#define AFS_FBSD130_ENV 1 + +#define AFS_X86_FBSD101_ENV 1 +#define AFS_X86_FBSD102_ENV 1 +#define AFS_X86_FBSD103_ENV 1 +#define AFS_X86_FBSD104_ENV 1 +#define AFS_X86_FBSD110_ENV 1 +#define AFS_X86_FBSD111_ENV 1 +#define AFS_X86_FBSD120_ENV 1 +#define AFS_X86_FBSD121_ENV 1 +#define AFS_X86_FBSD122_ENV 1 +#define AFS_X86_FBSD123_ENV 1 +#define AFS_X86_FBSD130_ENV 1 + +#else /* !defined(UKERNEL) */ + +/* This section for user space compiles only */ + +#define AFS_USR_FBSD101_ENV 1 +#define AFS_USR_FBSD102_ENV 1 +#define AFS_USR_FBSD103_ENV 1 +#define AFS_USR_FBSD104_ENV 1 +#define AFS_USR_FBSD110_ENV 1 +#define AFS_USR_FBSD111_ENV 1 +#define AFS_USR_FBSD120_ENV 1 +#define AFS_USR_FBSD121_ENV 1 +#define AFS_USR_FBSD122_ENV 1 +#define AFS_USR_FBSD123_ENV 1 +#define AFS_USR_FBSD130_ENV 1 + +#endif /* !defined(UKERNEL) */ + +#define USE_UCONTEXT + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.amd64_fbsd_131.h b/src/config/param.amd64_fbsd_131.h new file mode 100644 index 0000000000..59072b4c56 --- /dev/null +++ b/src/config/param.amd64_fbsd_131.h @@ -0,0 +1,61 @@ +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +/* Machine / Operating system information */ +#define SYS_NAME "amd64_fbsd_131" +#define SYS_NAME_ID SYS_NAME_ID_amd64_fbsd_131 + +#define AFS_64BITPOINTER_ENV 1 +#define AFS_64BITUSERPOINTER_ENV 1 + +#ifndef UKERNEL +/* This section for kernel libafs compiles only */ + +#define AFS_FBSD101_ENV 1 +#define AFS_FBSD102_ENV 1 +#define AFS_FBSD103_ENV 1 +#define AFS_FBSD104_ENV 1 +#define AFS_FBSD110_ENV 1 +#define AFS_FBSD111_ENV 1 +#define AFS_FBSD120_ENV 1 +#define AFS_FBSD121_ENV 1 +#define AFS_FBSD122_ENV 1 +#define AFS_FBSD123_ENV 1 +#define AFS_FBSD130_ENV 1 +#define AFS_FBSD131_ENV 1 + +#define AFS_X86_FBSD101_ENV 1 +#define AFS_X86_FBSD102_ENV 1 +#define AFS_X86_FBSD103_ENV 1 +#define AFS_X86_FBSD104_ENV 1 +#define AFS_X86_FBSD110_ENV 1 +#define AFS_X86_FBSD111_ENV 1 +#define AFS_X86_FBSD120_ENV 1 +#define AFS_X86_FBSD121_ENV 1 +#define AFS_X86_FBSD122_ENV 1 +#define AFS_X86_FBSD123_ENV 1 +#define AFS_X86_FBSD130_ENV 1 +#define AFS_X86_FBSD131_ENV 1 + +#else /* !defined(UKERNEL) */ + +/* This section for user space compiles only */ + +#define AFS_USR_FBSD101_ENV 1 +#define AFS_USR_FBSD102_ENV 1 +#define AFS_USR_FBSD103_ENV 1 +#define AFS_USR_FBSD104_ENV 1 +#define AFS_USR_FBSD110_ENV 1 +#define AFS_USR_FBSD111_ENV 1 +#define AFS_USR_FBSD120_ENV 1 +#define AFS_USR_FBSD121_ENV 1 +#define AFS_USR_FBSD122_ENV 1 +#define AFS_USR_FBSD123_ENV 1 +#define AFS_USR_FBSD130_ENV 1 +#define AFS_USR_FBSD131_ENV 1 + +#endif /* !defined(UKERNEL) */ + +#define USE_UCONTEXT + +#endif /* AFS_PARAM_H */