mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
SOLARIS: Support 64-bit SPARC userspace builds
Modify OpenAFS to respect user-specified ARCHFLAGS (-m32 or -m64) when building on Solaris 10 and 11 SPARC platforms. If ARCHFLAGS is unset/unspecified, we will continue to build 32-bit userspace by default. Implement -m64 SPARC LWP via USE_UCONTEXT; leave the -m32 SPARC LWP (default) implementation unchanged. Kernelspace builds remain 64-bit, regardless of ARCHFLAGS value. Change-Id: Ibb8e145d0cb8dfbe05de896b84c1d1135664b845 Reviewed-on: https://gerrit.openafs.org/14897 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
parent
a06cafd6d6
commit
3db9ecd852
@ -470,15 +470,38 @@ case $AFS_SYSNAME in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
sun4x_5*)
|
sun4x_5*)
|
||||||
|
case $AFS_SYSNAME in
|
||||||
|
sun4x_58|sun4x_59)
|
||||||
|
XARCHFLAGS=""
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if test "x`echo "${ARCHFLAGS}" | grep m32`" != "x" ; then
|
||||||
|
CURRENTBUILDARCH=sparc
|
||||||
|
fi
|
||||||
|
if test "x`echo "${ARCHFLAGS}" | grep m64`" != "x" ; then
|
||||||
|
CURRENTBUILDARCH=sparcv9
|
||||||
|
fi
|
||||||
|
if test "x${CURRENTBUILDARCH}" = "x" ; then
|
||||||
|
CURRENTBUILDARCH=sparc
|
||||||
|
fi
|
||||||
|
if test "${CURRENTBUILDARCH}" = "sparcv9" ; then
|
||||||
|
XARCHFLAGS="-m64"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
LD="/usr/ccs/bin/ld"
|
LD="/usr/ccs/bin/ld"
|
||||||
MT_CFLAGS='-mt'
|
MT_CFLAGS='-mt'
|
||||||
PAM_CFLAGS="-KPIC"
|
PAM_CFLAGS="-KPIC"
|
||||||
PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
|
PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
|
||||||
SHLIB_CFLAGS="-KPIC"
|
SHLIB_CFLAGS="-KPIC"
|
||||||
XCFLAGS64='${XCFLAGS} -m64'
|
XCFLAGS0="-dy -Bdynamic"
|
||||||
XCFLAGS="-dy -Bdynamic"
|
XCFLAGS64="${XCFLAGS0} -m64"
|
||||||
|
XCFLAGS="${XCFLAGS0} ${XARCHFLAGS}"
|
||||||
|
XLDFLAGS64="-m64"
|
||||||
|
XLDFLAGS="${XARCHFLAGS}"
|
||||||
XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
|
XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
|
||||||
SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
|
SHLIB_LINKER="${CC} ${XARCHFLAGS} -G -dy -Bsymbolic -z text"
|
||||||
LWP_OPTMZ="-g"
|
LWP_OPTMZ="-g"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -92,6 +92,14 @@
|
|||||||
#endif
|
#endif
|
||||||
#define ROOTINO UFSROOTINO
|
#define ROOTINO UFSROOTINO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 64-bit SPARC LWP is implemented via USE_UCONTEXT.
|
||||||
|
* 32-bit SPARC LWP is implemented via process.default.s.
|
||||||
|
*/
|
||||||
|
#if defined(_LP64)
|
||||||
|
# define USE_UCONTEXT
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* AFS_PARAM_H */
|
#endif /* AFS_PARAM_H */
|
||||||
|
|
||||||
#else /* !defined(UKERNEL) */
|
#else /* !defined(UKERNEL) */
|
||||||
@ -154,6 +162,10 @@
|
|||||||
#endif
|
#endif
|
||||||
#define ROOTINO UFSROOTINO
|
#define ROOTINO UFSROOTINO
|
||||||
|
|
||||||
|
#if defined(_LP64)
|
||||||
|
# define USE_UCONTEXT
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* AFS_PARAM_H */
|
#endif /* AFS_PARAM_H */
|
||||||
|
|
||||||
#endif /* !defined(UKERNEL) */
|
#endif /* !defined(UKERNEL) */
|
||||||
|
@ -95,6 +95,14 @@
|
|||||||
#endif
|
#endif
|
||||||
#define ROOTINO UFSROOTINO
|
#define ROOTINO UFSROOTINO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 64-bit SPARC LWP is implemented via USE_UCONTEXT.
|
||||||
|
* 32-bit SPARC LWP is implemented via process.default.s.
|
||||||
|
*/
|
||||||
|
#if defined(_LP64)
|
||||||
|
# define USE_UCONTEXT
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* AFS_PARAM_H */
|
#endif /* AFS_PARAM_H */
|
||||||
|
|
||||||
#else /* !defined(UKERNEL) */
|
#else /* !defined(UKERNEL) */
|
||||||
@ -160,6 +168,10 @@
|
|||||||
#endif
|
#endif
|
||||||
#define ROOTINO UFSROOTINO
|
#define ROOTINO UFSROOTINO
|
||||||
|
|
||||||
|
#if defined(_LP64)
|
||||||
|
# define USE_UCONTEXT
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* AFS_PARAM_H */
|
#endif /* AFS_PARAM_H */
|
||||||
|
|
||||||
#endif /* !defined(UKERNEL) */
|
#endif /* !defined(UKERNEL) */
|
||||||
|
@ -63,6 +63,14 @@ process.default.s:
|
|||||||
CFLAGS_process.o = @CFLAGS_NODANGLING_POINTER@
|
CFLAGS_process.o = @CFLAGS_NODANGLING_POINTER@
|
||||||
process.o : process.default.s process.i386.s process.amd64.s process.c lwp.o
|
process.o : process.default.s process.i386.s process.amd64.s process.c lwp.o
|
||||||
@set -x; case "$(SYS_NAME)" in \
|
@set -x; case "$(SYS_NAME)" in \
|
||||||
|
sun4x_510 | sun4x_511 ) \
|
||||||
|
if [ "${ARCHFLAGS}" = "-m64" ] ; then \
|
||||||
|
$(AFS_CCRULE_NOQ) -c ${srcdir}/process.c ; \
|
||||||
|
else \
|
||||||
|
$(PATH_CPP) -P -I${TOP_INCDIR} ${srcdir}/process.default.s > process.s; \
|
||||||
|
${AS} process.s -o process.o; \
|
||||||
|
$(RM) process.s ; \
|
||||||
|
fi;; \
|
||||||
sun4x_5* | arm_linux* ) \
|
sun4x_5* | arm_linux* ) \
|
||||||
$(PATH_CPP) -P -I${TOP_INCDIR} ${srcdir}/process.default.s > process.s; \
|
$(PATH_CPP) -P -I${TOP_INCDIR} ${srcdir}/process.default.s > process.s; \
|
||||||
${AS} process.s -o process.o; \
|
${AS} process.s -o process.o; \
|
||||||
|
Loading…
Reference in New Issue
Block a user