Re: hppa and libffi - SableVM on HP-UX

David Bélanger <[email protected]> Tue, 19 Apr 2005 17:07:47 -0400
Newsgroups gmane.comp.java.vm.sablevm.general
Message-ID <[email protected]>
On Tue, Apr 19, 2005 at 08:08:31PM +0000, [email protected] wrote:
> Thanks for your help Etienne.
> I tried the latest snapshot of libffi-sablevm that you provided, but didn't have much luck. I get an error during "configure":
>  configure: error: "libffi has not been ported to hppa2.0w-hp-hpux11.00."
> I couldn't seem to add an entry for my machine in the $host check of my configure.ac file and get rid of the unsupported message: "libffi has not been ported to hppa2.0w-hp-hpux11.00.".
>  I tried to pass in --build=<an acceptable value for the $host check in configure.ac>, in which I entered "hppa-64-linux11.00", but then I got this at the end of the build after creating the Makefile:
>  config.status: linking ../src/pa/ffitarget.h to include/ffitarget.h
>  config.status: error: ../src/pa/ffitarget.h: file not found
>  Do you know the best way to resolve/approach this problem?
>  Thanks, Mike 
> 

Hi Mike,

First, the libffi implementation depends on 2 things:
1) the CPU architecture used
2) the OS used, or to be more precise, the ABI (Abstract Binary
Interface) i.e. the registers/calling conventions for that OS.

So the Linux/hppa implementation will not necessary work on hppa...
But it is the closest to your system and it is the starting point.

--build, --host, etc. are for cross-compilation...

In configure.ac, search for:
hppa-*-linux* | parisc-*-linux*) TARGET=PA; TARGETDIR=pa;;
And replace that line with:
hppa*-hp-hpux* | hppa-*-linux* | parisc-*-linux*) TARGET=PA;
TARGETDIR=pa;;

Run ./autogen.sh to regenerate configure from configure.ac (have you
done that the first time?)

This should remove the error message and should use the same source as
Linux.

If HP-UX and Linux differs in the ABI in the functionnality used by
SableVM, then you will have to search for the HP-UX ABI documentation,
compare it with Linux and do the necessary modification (requires
assembly programming and good knowledge of your architecture).

David

---

David Bélanger
Web page:   http://www.cs.mcgill.ca/~dbelan2/
Public key: http://www.cs.mcgill.ca/~dbelan2/public_key.txt