diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index 623154650f..d5f42e8d8c 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -613,7 +613,19 @@ case $AFS_SYSNAME in SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text" ;; - sunx86_510) + sunx86_510|sunx86_511) + if test "x`echo "${ARCHFLAGS}" | grep m32`" != "x" ; then + CURRENTBUILDARCH=i386 + fi + if test "x`echo "${ARCHFLAGS}" | grep m64`" != "x" ; then + CURRENTBUILDARCH=amd64 + fi + if test "x${CURRENTBUILDARCH}" = "x" ; then + CURRENTBUILDARCH=`isainfo -k` + fi + if test "${CURRENTBUILDARCH}" = "amd64" ; then + XARCHFLAGS="-m64" + fi CC=$SOLARISCC CCOBJ=$SOLARISCC LD="/usr/ccs/bin/ld" @@ -623,31 +635,18 @@ case $AFS_SYSNAME in PAM_LIBS="-lc -lpam -lsocket -lnsl -lm" SHLIB_CFLAGS="-KPIC" SHLIB_LDFLAGS="-G -Bsymbolic" - XCFLAGS64='${XCFLAGS} -m64' - XCFLAGS="-dy -Bdynamic" + XCFLAGS0="-dy -Bdynamic" + XCFLAGS64="${XCFLAGS0} -m64" + XCFLAGS="${XCFLAGS0} ${XARCHFLAGS}" + XLDFLAGS64="-m64" + XLDFLAGS="${XARCHFLAGS}" + ASFLAGS="${XARCHFLAGS}" XLIBELFA="-lelf" XLIBKVM="-lkvm" XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" - SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text" + SHLIB_LINKER="${CC} ${XCFLAGS} -G -z text" ;; - sunx86_511) - CC=$SOLARISCC - CCOBJ=$SOLARISCC - LD="/usr/ccs/bin/ld" - MT_CC=$SOLARISCC - MT_CFLAGS='-mt' - PAM_CFLAGS="-KPIC" - PAM_LIBS="-lc -lpam -lsocket -lnsl -lm" - SHLIB_CFLAGS="-KPIC" - SHLIB_LDFLAGS="-G -Bsymbolic" - XCFLAGS64='${XCFLAGS} -xarch=amd64' - XCFLAGS="-dy -Bdynamic" - XLIBELFA="-lelf" - XLIBKVM="-lkvm" - XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" - SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text" - ;; esac MT_CFLAGS="${MT_CFLAGS} -DAFS_PTHREAD_ENV" diff --git a/src/lwp/Makefile.in b/src/lwp/Makefile.in index 35c1281ff5..c9cf827c8e 100644 --- a/src/lwp/Makefile.in +++ b/src/lwp/Makefile.in @@ -50,7 +50,7 @@ process.s: @echo Nothing to be done for process.s # Making process.o for $(SYS_NAME) -process.o : process.s process.i386.s process.c lwp.o +process.o : process.s process.i386.s process.amd64.s process.c lwp.o @set -x; case "$(SYS_NAME)" in \ sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53 | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5* | arm_linux* ) \ $(PATH_CPP) -P -I${TOP_INCDIR} ${srcdir}/process.s > process.ss; \ @@ -129,10 +129,20 @@ process.o : process.s process.i386.s process.c lwp.o ${CCOBJ} -DIGNORE_STDS_H -E -I${srcdir} -I${TOP_INCDIR} process.S > process.ss ; \ ${AS} process.ss -o process.o ; \ $(RM) -f process.S ;;\ - ncrx86_* | sunx86_*) \ + ncrx86_* | sunx86_58 | sunx86_59 ) \ $(PATH_CPP) -P -D__sun -D__i386 -DIGNORE_STDS_H -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s > process.ss; \ ${AS} -o process.o process.ss; \ $(RM) process.ss ;; \ + sunx86_510 | sunx86_511) \ + if [ "${ASFLAGS}" = "-m64" ] ; then \ + CURRENTBUILDARCH=amd64 ; \ + else \ + XCPPFLAGS="-D__i386" ; \ + CURRENTBUILDARCH=i386 ; \ + fi ; \ + $(PATH_CPP) $${XCPPFLAGS} -P -D__sun -DIGNORE_STDS_H -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.$${CURRENTBUILDARCH}.s > process.ss ; \ + ${AS} ${ASFLAGS} -o process.o process.ss ; \ + $(RM) process.ss ;; \ alpha_nbsd* ) \ $(PATH_CPP) -DASSEMBLER -P -I${TOP_INCDIR} ${srcdir}/process.s > process.ss; \ ${AS} -o process.o process.ss; \ diff --git a/src/shlibafsrpc/Makefile.in b/src/shlibafsrpc/Makefile.in index a0a7403e1e..0d5327d286 100644 --- a/src/shlibafsrpc/Makefile.in +++ b/src/shlibafsrpc/Makefile.in @@ -287,7 +287,7 @@ syscall.o: ${SYS}/syscall.s case "$(SYS_NAME)" in \ sun4x_5* | sunx86_5*) \ $(PATH_CPP) ${SFLAGS} ${SYS}/syscall.s > syscall.ss; \ - as -o syscall.o syscall.ss; \ + ${AS} ${ASFLAGS} -o syscall.o syscall.ss; \ $(RM) syscall.ss;; \ arm_darwin_* ) \ touch syscall.c ; \