[OpenAFS-devel] Re: Compiling openafs on arm64/aarch64 architecture

Micheal Waltz mwaltz@qualcomm.com
Wed, 3 Sep 2014 13:47:55 -0700


--------------010902090806010305050108
Content-Type: text/plain; charset="windows-1252"; format=flowed
Content-Transfer-Encoding: 7bit

On 09/02/14 16:32, Andrew Deason wrote:
> Try the attached patch in addition to the diff you just posted. This 
> may (likely) fail horribly trying to compile process.c, but just in 
> case this might work without me having to build an aarch64 image 
> locally... 

This patch to src/lwp/Makefile.in in combination with the other ucontext 
patch to param.arm_linux26 allowed the build to complete on aarch64 and 
I now have a full set of am64 debs for Ubuntu 14.04. I put the two 
patches together and have attached it here as well as the Ubuntu bug report.

Is it possible to get this included in a 1.6.8 or future release?

Thank you all for your help.

-- 
Micheal Waltz
Unix Configuration Management (go/ucm)
Qualcomm Inc.
Phone: 858-845-6083
Cell: 858-882-7079


--------------010902090806010305050108
Content-Type: text/x-patch; name="aarch64-openafs.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="aarch64-openafs.patch"

--- build-tools/config.guess
+++ build-tools/config.guess
@@ -159,7 +159,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
 	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
 	case "${UNAME_MACHINE_ARCH}" in
 	    armeb) machine=armeb-unknown ;;
-	    arm*) machine=arm-unknown ;;
+	    arm*|aarch64*) machine=arm-unknown ;;
 	    sh3el) machine=shl-unknown ;;
 	    sh3eb) machine=sh-unknown ;;
 	    sh5el) machine=sh5le-unknown ;;
@@ -168,7 +168,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
 	# The Operating System including object format, if it has switched
 	# to ELF recently, or will in the future.
 	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+	    arm*|aarch64*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 			| grep -q __ELF__
@@ -872,7 +872,7 @@ EOF
 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
 	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
 	exit ;;
-    arm*:Linux:*:*)
+    arm*:Linux:*:*|aarch64*:Linux:*:*)
 	eval $set_cc_for_build
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
 	    | grep -q __ARM_EABI__
--- build-tools/config.sub
+++ build-tools/config.sub
@@ -249,7 +249,7 @@ case $basic_machine in
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
 	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 | aarch64 \
 	| bfin \
 	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
@@ -331,7 +331,7 @@ case $basic_machine in
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* | aarch64-* \
 	| avr-* | avr32-* \
 	| bfin-* | bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
--- src/config/param.arm_linux26.h
+++ src/config/param.arm_linux26.h
@@ -34,7 +34,4 @@
 #define __NR_afs_syscall 137
 #endif
 
-/* glibc doesn't implement getcontext/savecontext for arm. */
-#undef USE_UCONTEXT
-
 #endif /* AFS_PARAM_H */
--- src/lwp/Makefile.in
+++ src/lwp/Makefile.in
@@ -53,7 +53,7 @@ process.s:
 # Making process.o for $(SYS_NAME)
 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* ) \
+	sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53  | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5* ) \
 		$(PATH_CPP) -P -I${TOP_INCDIR} ${srcdir}/process.s > process.ss; \
 		${AS} process.ss -o process.o; \
 			$(RM) process.ss ;; \

--------------010902090806010305050108--