Re: [Tinycc-devel] "error: undefined symbol main" with -pthread on linux

2017-12-23 Thread avih
Confirmed fixed. Thanks.

So quick, it must be Christmas! I wish I had more bugs to report ;)  

On Saturday, December 23, 2017 3:52 PM, Michael Matz  
wrote:
 

 Hi,

On Sat, 23 Dec 2017, avih wrote:

> I think maybe, instead of saying and doing:
> -pthread   same as -D_REENTRANT and -lpthread
> 
> It should say and do something along these lines:
> -pthread   same as -D_REENTRANT while compiling and -lpthread while linking

I decided to keep the help message as is (staying in <= 80 columns), but 
...

> However, It seems to still not behave the same as gcc. Using the same 
> test.c file as before:
> 
> tcc -pthread -c test.c # -> tcc: error: cannot specify libraries with -c
> 
> It's not unreasonable I think that tcc complains, but gcc is fine with it.

... I've fixed this behaviour.  I agree that -pthread shouldn't add the 
library with -c (or, well, at least not complain then :) ).


Ciao,
Michael.

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


Re: [Tinycc-devel] "error: undefined symbol main" with -pthread on linux

2017-12-23 Thread Michael Matz

Hi,

On Sat, 23 Dec 2017, avih wrote:


I think maybe, instead of saying and doing:
-pthread   same as -D_REENTRANT and -lpthread

It should say and do something along these lines:
-pthread   same as -D_REENTRANT while compiling and -lpthread while linking


I decided to keep the help message as is (staying in <= 80 columns), but 
...


However, It seems to still not behave the same as gcc. Using the same 
test.c file as before:


tcc -pthread -c test.c # -> tcc: error: cannot specify libraries with -c

It's not unreasonable I think that tcc complains, but gcc is fine with it.


... I've fixed this behaviour.  I agree that -pthread shouldn't add the 
library with -c (or, well, at least not complain then :) ).



Ciao,
Michael.___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] "error: undefined symbol main" with -pthread on linux

2017-12-23 Thread Michael Matz

Hi,

On Sat, 23 Dec 2017, avih wrote:


Try the same with -pthread:
tcc -pthread ./test.o -otest  # -> tcc: error: undefined symbol 'main'


Thanks for the report.  Fix in mob.


Ciao,
Michael.___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel