]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-darwin-x86-20051015
authorChas Williams <chas@cmf.nrl.navy.mil>
Fri, 21 Oct 2005 05:48:39 +0000 (05:48 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 21 Oct 2005 05:48:39 +0000 (05:48 +0000)
FIXES 20130

add support for x86 darwin

acinclude.m4
src/cf/osconf.m4
src/config/afs_sysnames.h
src/config/param.x86_darwin_80.h [new file with mode: 0644]
src/des/andrew-conf.h
src/des/conf-darwin.h [new file with mode: 0644]
src/libafs/MakefileProto.DARWIN.in
src/lwp/Makefile.in
src/lwp/process.i386.s

index 6ce5f797b29e1180489d5c49c865c5f5ac385fae..1035f60c6ea95df10a7ea10ab43cc54a444ed9b5 100644 (file)
@@ -210,10 +210,14 @@ case $system in
                fi
                AC_SUBST([HEADER_RT])
                 ;;
-        *-darwin*)
+        powerpc-*-darwin*)
                MKAFS_OSTYPE=DARWIN
                 AC_MSG_RESULT(ppc_darwin)
                 ;;
+        i386-*-darwin*)
+               MKAFS_OSTYPE=DARWIN
+                AC_MSG_RESULT(x86_darwin)
+                ;;
        *-freebsd*)
                MKAFS_OSTYPE=FBSD
                AC_MSG_RESULT(i386_fbsd)
@@ -382,6 +386,12 @@ else
                powerpc-apple-darwin8*)
                        AFS_SYSNAME="ppc_darwin_80"
                        ;;
+               powerpc-apple-darwin8.*)
+                       AFS_SYSNAME="ppc_darwin_80"
+                       ;;
+               i386-apple-darwin8.*)
+                       AFS_SYSNAME="x86_darwin_80"
+                       ;;
                sparc-sun-solaris2.5*)
                        AFS_SYSNAME="sun4x_55"
                        enable_login="yes"
index 1db1ed95f37b8e7ae1ed7d6f29bbe657e010eae8..ce98b3adc05fba57f0045797053f073d338aad18 100644 (file)
@@ -437,7 +437,7 @@ case $AFS_SYSNAME in
                EXTRA_VLIBOBJS="fstab.o"
                ;;
 
-       ppc_darwin_80)
+       *_darwin_80)
                AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
                LEX="lex -l"
                MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}'
index 0b2ebcbe4fe722e4822cca049660b4fd153fe56e..b54fc4fef42528799c4b7c023e95e79d87ed860f 100644 (file)
@@ -59,6 +59,7 @@
 #define SYS_NAME_ID_ppc_darwin_60        506
 #define SYS_NAME_ID_ppc_darwin_70        507
 #define SYS_NAME_ID_ppc_darwin_80        508
+#define SYS_NAME_ID_x86_darwin_80        509
 
 #define SYS_NAME_ID_next_mach20                 601
 #define SYS_NAME_ID_next_mach30                 602
diff --git a/src/config/param.x86_darwin_80.h b/src/config/param.x86_darwin_80.h
new file mode 100644 (file)
index 0000000..e969781
--- /dev/null
@@ -0,0 +1,137 @@
+#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
+#define AFS_VFSINCL_ENV                1
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_DARWIN_ENV
+#define AFS_DARWIN13_ENV
+#define AFS_DARWIN14_ENV
+#define AFS_DARWIN60_ENV
+#define AFS_DARWIN70_ENV
+#define AFS_DARWIN80_ENV
+#define AFS_NONFSTRANS
+#define AFS_SYSCALL             230
+#define AFS_NAMEI_ENV 1
+#define DARWIN_REFBASE 3
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS    "afs"
+
+/* Machine / Operating system information */
+#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_NAME        "x86_darwin_80"
+#define SYS_NAME_ID     SYS_NAME_ID_x86_darwin_80
+#define AFSLITTLE_ENDIAN   1
+#define AFS_HAVE_FFS    1      /* Use system's ffs. */
+
+#define AFS_GCPAGS               0
+#define RXK_LISTENER_ENV         1
+
+#ifdef KERNEL
+#undef MACRO_BEGIN
+#undef MACRO_END
+#include <kern/macro_help.h>
+#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_VFSINCL_ENV 1      /* NOBODY uses this.... */
+#define AFS_ENV                 1
+#define AFS_64BIT_ENV           1      /* Defines afs_int32 as int, not long. */
+#define AFS_X86_ENV 1
+
+#include <afs/afs_sysnames.h>
+#define AFS_USERSPACE_ENV
+#define AFS_USR_DARWIN_ENV
+#define AFS_USR_DARWIN13_ENV
+#define AFS_USR_DARWIN14_ENV
+#define AFS_USR_DARWIN60_ENV
+#define AFS_USR_DARWIN70_ENV
+#define AFS_USR_DARWIN80_ENV
+#define AFS_NONFSTRANS
+#define AFS_SYSCALL             230
+#define DARWIN_REFBASE 0
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS    "afs"
+
+/* Machine / Operating system information */
+#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_NAME        "x86_darwin_80"
+#define SYS_NAME_ID     SYS_NAME_ID_x86_darwin_80
+#define AFSLITTLE_ENDIAN   1
+#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) */
index 0c3e3efad05adff8c46e702d078d2aa699358847..cad29fd732bbab3e9ba8dc6131b402925ad4ff47 100644 (file)
@@ -93,8 +93,8 @@
 #endif /* AFS_PPC_LINUX20_ENV */
 #endif /* AFS_PARISC_LINUX24_ENV */
 #else
-#if defined(AFS_DARWIN_ENV) && defined(AFS_PPC_ENV)
-#include "conf-ppc-darwin.h"
+#if defined(AFS_DARWIN_ENV)
+#include "conf-darwin.h"
 #else
 Sorry,
     you lose.
diff --git a/src/des/conf-darwin.h b/src/des/conf-darwin.h
new file mode 100644 (file)
index 0000000..592e6b0
--- /dev/null
@@ -0,0 +1,11 @@
+#define BITS32
+#define BIG
+#undef BSDUNIX
+#if defined(__ppc__)
+#define MSBFIRST
+#elif defined(__i386__)
+#define LSBFIRST
+#else
+#error "MSBFIRST or LSBFIRST undefined"
+#endif
+#define MUSTALIGN
index 86603586e1e3fcebac8821b2eb7ebfb3bec49aa4..456f4e202655ca760a048d606104269a30e752ec 100644 (file)
@@ -33,10 +33,13 @@ AFS_OS_NONFSOBJS = osi_vfsops.o
 KDEFS=
 DBUG = 
 DEFINES= -D_KERNEL -DKERNEL -DKERNEL_PRIVATE -DDIAGNOSTIC -DUSE_SELECT -DMACH_USER_API -DMACH_KERNEL
+<x86_darwin_80>
+KOPTS=-static -g -nostdinc -nostdlib -no-cpp-precomp -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch i386 -Di386 -DI386 -D__I386__ -DPAGE_SIZE_FIXED -march=i686 -mpreferred-stack-boundary=2 -falign-functions=4
+MODLD=$(CC) $(KOPTS)
 <ppc_darwin_80>
 KOPTS=-static -g -nostdinc -nostdlib -no-cpp-precomp -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch ppc -Dppc -DPPC -D__PPC__ -DPAGE_SIZE_FIXED -O2 -mcpu=750 -mmultiple -fschedule-insns
 MODLD=$(CC) $(KOPTS)
-<all -ppc_darwin_80>
+<all -ppc_darwin_80 -x86_darwin_80>
 MODLD=$(LD)
 <ppc_darwin_70>
 KOPTS=-static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
index 8345e01aac0d3c2c71462085f7b240b4a35c2550..4dfd8284de7643f5e2452a67b9932236328d192b 100644 (file)
@@ -52,8 +52,12 @@ process.o    : process.s process.i386.s process.c
                /lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s390x.s >process.ss; \
                ${AS} -ahlns process.ss -o process.o >process.lst; \
                $(RM) process.ss ;; \
-       *_darwin* ) \
+       ppc_darwin* ) \
                $(CC) ${LWP_DBG} ${LWP_OPTMZ} -c ${XCFLAGS} -I${TOP_INCDIR} ${srcdir}/process.s;; \
+       x86_darwin*) \
+               /usr/bin/cpp -P -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s process.ss; \
+               ${AS} process.ss -o process.o; \
+               $(RM) process.ss ;; \
        i386_*bsd*) \
                cp ${srcdir}/process.i386.s process.S ; \
                ${CCOBJ} -DIGNORE_STDS_H -E -I${srcdir} -I${TOP_INCDIR} process.S > process.ss ; \
index 951ca0d56001838792779a066b1cf7b593ba6ac8..3dfae1ae8017d2f6cf8ae22f3c929350f0d0cbb9 100644 (file)
@@ -59,9 +59,11 @@ ENTRY(savecontext)
 L1:
        jmp     *f(%ebp)                        /* ebx = &f */
 
+#if !defined(AFS_DARWIN_ENV)
 /* Shouldn't be here....*/
 
        call    _C_LABEL(abort)
+#endif
 
 /*
  * returnto(area2)
@@ -83,6 +85,8 @@ ENTRY(returnto)
        popl    %ebp
        ret
 
+#if !defined(AFS_DARWIN_ENV)
 /* I see, said the blind man, as he picked up his hammer and saw! */
        pushl   $1234
        call    _C_LABEL(abort)
+#endif