Hello Michael, That's clear now. IMHO, the best thing to do is to refuse to build tcc on systems that are not explicitly supported.
$ ./configure ** Error, tcc is not supported on this system. $ -----Original Message----- From: Tinycc-devel [mailto:[email protected]] On Behalf Of Michael Matz Sent: lundi 27 février 2017 01:05 To: [email protected] Subject: Re: [Tinycc-devel] What is the exact Darwin port status? (i.e. macOS) 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. _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
