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: Christian Jullien
Subject: Re: [Tinycc-devel] What is the exact Darwin port status? (i.e. macOS)
Date: Sun, 26 Feb 2017 16:38:31 +0100

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.
* On Darwin, 'make' alone is not supposed to produce something usable to any
purpose. IMHO, make should produce an error in this case.
* Btw, why are there some __APPLE__ in tccrun.c

-----Original Message-----
From: Tinycc-devel [mailto:address@hidden
On Behalf Of grischka
Sent: dimanche 26 février 2017 16:03
To: address@hidden
Subject: Re: [Tinycc-devel] What is the exact Darwin port status? (i.e.
macOS)

Christian Jullien wrote:
> Ok, but help me to better understand the purpose of a tcc build on Darwin.
> 
> * Currently, "./configure; make" produces on Sierra (Darwin) a tcc 
> executable (so far so good).
> * This tcc version runs on Darwin (as tcc- vv), so to me it is a 
> Sierra compatible binary. I don't understand quite well why it should 
> display Linux but let say it's Ok.

Because "tcc -v" is not a tool to tell you which OS you're on.

> Now, what am I supposed to do with it? 
> It is for example unable to compile  "Hello World"

Because your tcc is a compiler for Linux.  A Darwin -> Linux cross compiler
if you want to.

See 'make help' for how to configure cross compilers.

--- grischka

> byas:tinycc jullien$ cat foo.c
> #include <stdio.h>
>
> int main()
> {
>   printf("Hello World\n");
> }
>
> Compile only wit -c
>
> byas:tinycc jullien$ ./tcc -c foo.c
> In file included from foo.c:1:
> In file included from /usr/include/stdio.h:64:
> /usr/include/sys/cdefs.h:81: warning: #warning "Unsupported compiler 
> detected"
>
> Trying to produce an executable
>
> byas:tinycc jullien$ ./tcc foo.c
> /usr/lib/crt1.o: error: unrecognized file type
> tcc: error: file 'crt1.o' not found
> tcc: error: file 'crti.o' not found
> In file included from foo.c:1:
> In file included from /usr/include/stdio.h:64:
> /usr/include/sys/cdefs.h:81: warning: #warning "Unsupported compiler 
> detected"
> tcc: error: library 'c' not found
> tcc: error: file '/usr/local/lib/tcc/libtcc1.a' not found
> tcc: error: file 'crtn.o' not found
> tcc: error: undefined symbol 'printf'
>
> -----Original Message-----
> From: Tinycc-devel 
> [mailto:address@hidden
> On Behalf Of grischka
> Sent: dimanche 26 février 2017 14:27
> To: address@hidden
> Subject: Re: [Tinycc-devel] What is the exact Darwin port status? (i.e.
> macOS)
>
> Christian Jullien wrote:
>> What tcc knows (it thinks it is Linux, I can fix this one easily):
>>
>> tcc version 0.9.27 (x86_64 Linux)
>
> No, this is correct.  This message is trying to tell you that this tcc 
> will create executables for a Linux OS running on a x86_64 processor.
>
> These executables will not work on windows or arm or darwin.
>
> --- grischka


_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel




reply via email to

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