[Mono-devel-list] Re: Mono on AIX [Virus checked]

Winfried.Harbecke at Extern.Sparkassen-Informatik.de Winfried.Harbecke at Extern.Sparkassen-Informatik.de
Fri Dec 3 11:50:55 EST 2004


On 12/02/04 Paolo Molaro <lupus at ximian.com> wrote:

> Could you print the default preprocessor defines that your compiler
> defines? We current use __ppc__ and __powerpc__ and it looks it
> doesn't define either.

You are right, and the native IBM compiler does not define them either. To
be specific,

gcc -dumpspecs:

*cpp:
      %{posix: -D_POSIX_SOURCE}
      %{ansi: -D_ANSI_C_SOURCE}
      %{maix64: -D__64BIT__}
      %{mpe: -I/usr/lpp/ppe.poe/include}
      %{pthread: -D_THREAD_SAFE}

these seem to be incomplete, at least GCC generally defines "_AIX". The
native compiler defaults to generating code that also runs on their POWER
machines, so if they have any default flags they would probably look like
__COM__ (for "common instruction set"). In order to be pedantic, configure
checks might be required to exclude machines that don't support the
cache flushing instructions required by newer versions of glib, but I guess
those won't be running AIX 5.x anyway.

As far as I can see, there shouldn't be any objections to explicitly having
      -D__ppc__
in the (AIX-) platform specific part of configure.in.

>> ** ERROR **: file interp.c: line 4153 (add_signal_handler): assertion
>> failed: (sigaction (signo, &sa, NULL) != -1)>
>
> You could use perror() to print an error message instead of the
> abort there, so we could see what is the error.

I'll try that.

> Most of the changes are fine, will commit, except the THREAD_ stuff and
> will make including <time.h> unconditional.

How about:
==========================================
  #define TLS_MINIMUM_AVAILABLE 64
  #define TLS_OUT_OF_INDEXES 0xFFFFFFFF

  #define STILL_ACTIVE STATUS_PENDING

+ /* avoid name clash with <sys/proc.h> for AIX */
+ #undef THREAD_TERMINATE

  #define THREAD_TERMINATE          0x0001
  #define THREAD_SUSPEND_RESUME           0x0002
==========================================

in mono/io-layer/threads.h - it looks like <sys/proc.h> has the clashing
#define primarily for kernel recompilation, which is not what we need to
do.
A configure check (e.g. "CLASHING_PROC_THREAD_TERMINATE")
might help avoiding future trouble (with highly non-obvious symptoms)
on non-AIX platforms, but that configure check would basically
be asking "is it AIX?" and limit those future troubles to AIX.

> The calling convention should be very close to the darwin one: there
> is a difference, though: function descriptors are used.

Is it o.k to prefix these to the trampoline code on the native heap (or
in mmap space, depending on NEED_MPROTECT)? IBM allocates those
at compile time in the data segment (their "table of contents", visible to
the linker),
but mono has to be more dynamic than that   :-)

> They have costumers pushing for more integration, ...

Thanks for commenting on the IBM position!

Greetings Winfried





More information about the Mono-devel-list mailing list