[erlang-questions] HiPE on powerpc

Mikael Pettersson mikpe@REDACTED
Fri Nov 16 23:15:00 CET 2007


On Fri, 16 Nov 2007 22:03:20 +0300, Sergei Golovan wrote:
> When building Erlang/OTP (R11B-5) with HiPE enabled on powerpc64
> machine (but compiler generated 32-bit code) there is the following
> error:
> 
> beam/erl_bif_info.c: In function 'system_info_1':
> beam/erl_bif_info.c:1221: error: 'am_powerpc' undeclared (first use in
> this function)
> 
> which usually appears if HiPE arcitecture is incorrect.
> 
> Shouldn't HiPE architecture be adjusted in this case? Is the following
> patch correct?
> 
> -----------------
> --- erlang.orig/erts/configure.in
> +++ erlang/erts/configure.in
> @@ -372,6 +372,10 @@
>  	AC_MSG_RESULT(yes: adjusting ARCH=sparc64 to ARCH=ultrasparc)
>  	ARCH=ultrasparc
>  	;;
> +ppc64-4)
> +	AC_MSG_RESULT(yes: adjusting ARCH=ppc64 to ARCH=ppc)
> +	ARCH=ppc
> +	;;
>  *)
>  	AC_MSG_RESULT(no)
>  	;;
> -----------------

Yes, this change looks correct.

If you can confirm that it fixes your build failure on ppc64 kernels
with gcc -m32 in userland, then I'll be happy to check it into HiPE CVS.

Alas we cannot test this ourselves since we don't have any ppc64 hardware.

/Mikael



More information about the erlang-questions mailing list