tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] What is the exact Darwin port status? (i.e. macOS)


From: Michael Matz
Subject: Re: [Tinycc-devel] What is the exact Darwin port status? (i.e. macOS)
Date: Mon, 27 Feb 2017 01:05:06 +0100 (CET)
User-agent: Alpine 2.20 (LSU 67 2015-01-07)

Hi,

On Sun, 26 Feb 2017, Christian Jullien wrote:

I start to better understand (fix me if I'm wrong).
* On Darwin I can only make a cross compiler, i.e. make for example a tcc
compiler that, when built, will run on Windows.

Yes. But of course for a really working cross compiler you'd also need the target libraries and headers.

* On Darwin, 'make' alone is not supposed to produce something usable to any
purpose. IMHO, make should produce an error in this case.

Probably.

* Btw, why are there some __APPLE__ in tccrun.c

A tiny attempt to make it even compile on os-x at all. Native support for Darwin would be a larger undertaking as you need to work with the native object file format, for libraries at least reading (either directly or via intermediate means like Windows import .def files) and for generated executables/libraries writing. That object file format is Mach-O and different from ELF or (PE)COFF.

As long as the latter doesn't exist you'd only be able to generate programs in memory (i.e. -run) and even then only programs that are completely self-contained and need no external libraries at all, not even the C library. And due to that even -run is most probably broken.


Ciao,
Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]