[MLton] x86_64 port status
Ville Laurikari
ville@laurikari.net
Sun, 7 May 2006 22:31:48 +0300
On Sat, May 06, 2006 at 06:30:42PM -0400, Matthew Fluet wrote:
> I'm specifically interested in the files c-types.h and c-types.sml
> (automatically copied to
> basis-library/config/c/$(TARGET_ARCH)-$(TARGET_OS)/), where the sizes
> and signedness of the C typedefs might be different from x86-linux.
The `basis-library/config/c/hppa-hpux' directory was missing and I had
to manually create it. Could the directory be created automatically
if it does not already exist?
> Second, I'm interested in any constants that aren't present on
> different platforms. I've been following the Single UNIX
> Specification (as a superset of Posix, XOpen, and other standards).
> I'm guessing that we'll have to drop a few more things to get to the
> intersection of our platforms.
HP-UX 11.00 doesn't have the following types/constants:
suseconds_t
PRIxPTR
SIZE_MAX
struct sockaddr_storage
_SC_HOST_NAME_MAX
_SC_ADVISORY_INFO
_SC_BARRIERS
_SC_CLOCK_SELECTION
_SC_CPUTIME
_SC_MONOTONIC_CLOCK
_SC_READER_WRITER_LOCKS
_SC_REGEXP
_SC_SHELL
_SC_SPAWN
_SC_SPIN_LOCKS
_SC_SPORADIC_SERVER
_SC_THREAD_CPUTIME
_SC_THREAD_SPORADIC_SERVER
_SC_TIMEOUTS
_SC_TRACE
_SC_TRACE_EVENT_FILTER
_SC_TRACE_INHERIT
_SC_TRACE_LOG
_SC_TYPED_MEMORY_OBJECTS
_SC_V6_ILP32_OFF32
_SC_V6_ILP32_OFFBIG
_SC_V6_LP64_OFF64
_SC_V6_LPBIG_OFFBIG
_SC_2_PBS
_SC_2_PBS_ACCOUNTING
_SC_2_PBS_CHECKPOINT
_SC_2_PBS_LOCATE
_SC_2_PBS_MESSAGE
_SC_2_PBS_TRACK
_SC_SYMLOOP_MAX
_SC_XOPEN_LEGACY
_SC_XOPEN_REALTIME
_SC_XOPEN_REALTIME_THREADS
_PC_ALLOC_SIZE_MIN
_PC_REC_INCR_XFER_SIZE
_PC_REC_MAX_XFER_SIZE
_PC_REC_MIN_XFER_SIZE
_PC_REC_XFER_ALIGN
_PC_SYMLINK_MAX
Additionally, IPv6 support in general is missing completely from HP-UX
11.00.
After some small patches, I managed to compile the runtime on
HPPA/HPUX. At the moment I get loads and loads of warnings. These
were a bit mystical:
./util/read_write.h: In function 'writeUint32U':
./util/read_write.h:57: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'uint32_t'
./util/read_write.h: In function 'writeUint32X':
./util/read_write.h:71: warning: format '%08lx' expects type 'long unsigned int', but argument 3 has type 'uint32_t'
It would seem that the formatting macros used (PRIu32 and PRIx32) are
correct for uint32_t. However, on HP-UX inttypes.h contains
#ifndef __L64_MODE__
#define PRIx32 "lx"
#else
#define PRIx32 "x"
#endif
and apparently I'm getting "lx" since __L64_MODE__ is not defined. I
don't quite understand why this is so.
Other warnings include 143 counts of the "cast increases required
alignment of target type" warning from various files.
Here are some others:
basis/MLton/Process/spawne.c: In function 'MLton_Process_spawne':
basis/MLton/Process/spawne.c:33: warning: function might be possible candidate for attribute 'noreturn'
basis/MLton/Process/spawnp.c: In function 'MLton_Process_spawnp':
basis/MLton/Process/spawnp.c:23: warning: function might be possible candidate for attribute 'noreturn'
Posix/FileSys/open2.c: In function 'Posix_FileSys_open2':
/usr/include/sys/fcntl.h:237: warning: 'c' is used uninitialized in this function
In file included from gc.c:22: gc/array-allocate.c: In function 'GC_arrayAllocate':
gc/array-allocate.c:30: warning: comparison of unsigned expression >= 0 is always true
In file included from gc.c:44:
gc/init.c: In function 'stringToFloat':
gc/init.c:27: warning: implicit declaration of function 'strtof'
gc/init.c:27: warning: nested extern declaration of 'strtof'
In file included from gc.c:45:
gc/int-inf.c: In function 'fillIntInfArg':
gc/int-inf.c:68: warning: right shift count >= width of type
--
http://www.iki.fi/vl/