Re: Cross platform - an interim proposal



On 2007-06-18, David Ninnes <david_ninnes@xxxxxxxxxxx> wrote:
So the question is how hard would it be for CG to adapt the Delphi
compiler to produce shared libraries in Mac format - I'm guessing not
very. This means more work on the app developers part, but would mean
Delphi Mac apps could get to market quicker.

Since Mac OS X has its own ABI, it would mostly depend on how flexible the
Borland compiler guys can implement a new ABI (say calling convention in the
broadest sense of the word).

Moreover, since Mac OS X uses yet another binary format than Windows (PE) or
Linux (ELF), called Mach-O, it would also mean significant assembler and
linker work. At least to make a supportable product. For a quick hack a
crosslinker based on the darwin sources may do.

The calling convention problem is probably the main reason why e.g. a CrossKylix
like hack to compile for OS X doesn't exist. The binary format could maybe
get transformed with some limitations, but adapting the codegeneration is too
hard.

A delphi compiler option that can produce Mac shared libraries.

Note that to crosscompile to *nix you usually need the *nix libraries on target.

I succeeded in crosscompiling Lazarus from Windows to OS X, but that
required copying the entire lib dir from OS X to Windows.

I'm currently studying linking in more detail (see John Irvine's excellent
book "linkers and loaders" if you are interested), and it seems that ELF
_has_ ways to avoid this problem, though I don't know how far Linux supports
this. I don't know it at all for Mach O.

I also wouldn't take the X-Code GUI creation too lightly. I know Macers
always point to it as the best thing since sliced bread, but I find it hard
to accomplish anything in it. Moreover then you get to the point of
Objective C (COCOA) to Pascal bridging, which is possible (there is a C
interface layer), but again extra work.

This would probably be an add on to the standard Delphi at extra cost to
make it worthwhile for CG (MS charges for there cross compiler to Mac
for Visual Studio).

They resell a byproduct (needed for Office Mac port). It is not comparable
to the CG situation I guess.

Are there any others that are interested in this solution? If so we
could perhaps look at lobbying CG. Any opinions as to feasability (I'm
not a Mac programmer)?

I think if it was feasable, they'd done it in Kylix times. I also think
any win64 cmdline compiler has higher prio than this.

.



Relevant Pages

  • Re: Where to go to write frontends:
    ... BASIC then converted it to the compiler when that came out in about '86. ... Linux and Mac and as far as I know, the visual designer is done for Linux ... The only really weak point with PureBASIC is how ActiveX and COM ...
    (comp.lang.basic.powerbasic)
  • Re: mixing C and assembly
    ... positioning of mac specific buffering. ... implementation specific extensions and intrinsics. ... Our experience is similar to that of other compiler companies ...
    (comp.arch.embedded)
  • Re: Common LISP Implementations for Mac OS X?
    ... I run now, or have run, just about every common lisp that runs on Mac OS ... Cocoa: via java ... compiler: slow ...
    (comp.lang.lisp)
  • Re: Intel 10 for MAC OSX ?
    ... I've seen many people request a cost-reduced multi-os license. ... too) we bit the bullet and got the Mac portable and a new iMac for my ... Things have come a long way to these tenth generation Intel ... Fortran compiler out of my cold dead hands even if I also start Real ...
    (comp.lang.fortran)
  • Re: Programming software for the Mac?
    ... Mac. ... I need something like a FORTRAN ... compiler, or BASIC, or C, or Pascal. ... one of the comp.sys.mac.programmer.* news groups. ...
    (comp.sys.mac.apps)