Currently, the libffi testsuite has two problems on Tru64 UNIX (the lack
of inttypes.h and stdint.h has already been dealt with since the PR):
* Both Tru64 UNIX V4.0F and V5.1B lack all PRI* macros, so we need to
provide replacements. Since this is a LP64 platform and V4.0F (unlike
V5.1B) lacks %ll[ud] support in printf, I've chosen to use %l[ud] for
all PRI* macros. If I do just this, several testcases fail due to
warnings like this:
/vol/gcc/src/gcc-dist/libffi/testsuite/libffi.call/cls_align_sint64.c:25:3: warning: format '%ld' expects type 'long int', but argument 3 has type 'long long int'
I've used -Wno-format in the affected testcases to silence them.
Since there is no easy way to distinguish between V4 and V5, I've
chosen this way on both releases. This could be handled better if the
PRI* replacements were determined with an autoconf test, but I won't
do this at the moment.
* On V4.0F, the libffi.special/unwindtest*.cc tests fail due to
In file included from /vol/gcc/src/gcc-dist/libffi/testsuite/libffi.special/unwindtest.cc:8:0:
/vol/gcc/src/gcc-dist/libffi/testsuite/libffi.special/ffitestcxx.h: In function 'void* allocate_mmap(size_t)':
/vol/gcc/src/gcc-dist/libffi/testsuite/libffi.special/ffitestcxx.h:87:15: error: ISO C++ forbids comparison between pointer and integer
Casting MAP_FAILED to a char * fixes this.
This way, testsuite results are reasonable again:
=== libffi Summary ===
# of expected passes 1603
# of unexpected failures 13
# of expected failures 10
# of unsupported tests 15
The failing tests are in two areas:
* libffi.call/huge_struct.c: This is problematic at least since Tru64
UNIX doesn't support %hh[ud] and %h[ud] in printf. It's probably best
to xfail those?
* libffi.special/unwindtest*.cc execution tests: I'll have to
investigate those.
Ok for mainline?