detecting 64-bit emulator

Vance Shipley <>
Wed Nov 13 22:33:46 CET 2002


I seem to have my linked in driver working in 64-bit mode now
on Sparc Solaris v8.  I had to do some porting to handle the
thread references being 8 bytes instead of 4.  That seems to
be working fine though and I am able to create a Binary which
contains my boot code and pass it down to the board for 
dowloading.  I am quite happy with this.

Now I want to get my automake/autoconf scripts to recognize
that the emulator is 64-bit and set the correct flags to build 
the driver library as 64-bit.  The first thing I tried didn't
work as I had hoped:

bash-2.05$ erl -version
Erlang (THREADS,SHARED_HEAP) (BEAM) emulator version 5.2

It didn't include the 64-bit flag. :(

bash-2.05$ erl
Erlang (BEAM) emulator version 5.2 [64-bit] [source] [shared heap] [threads:0]


I could use file:

bash-2.05$ file ./lib/erlang/erts-5.2/bin/beam
./lib/erlang/erts-5.2/bin/beam: ELF 64-bit MSB executable SPARCV9 Version 1, UltraSPARC1 Extensions Required, dynamically linked, not stripped


Anyone have a better idea?

	-Vance





More information about the erlang-questions mailing list