Re: [Tinycc-devel] Use TCC with GSL under Windows

2016-10-17 Thread Chen, Xianwen
Dear Michael,

Thank you.

I'm using the latest release, but not the latest version as of the 
source code. Are you suggesting me to compile tcc itself from source codes?

Warm regards,

Xianwen


On 14.10.2016 17:56, Michael Matz wrote:
> Hi,
>
> On Tue, 11 Oct 2016, Chen, Xianwen wrote:
>
>> In file included from Bessel_Function.c:1:
>> In file included from C:/cygwin64/usr/include//stdio.h:60:
>> In file included from C:/cygwin64/usr/include//sys/reent.h:15:
>> C:/cygwin64/usr/include//sys/_types.h:168: error: ',' expected (got "__wch")
>  From a bit googling that's probably this typedef:
>
>   typedef struct
>   {
> int __count;
> union
> {
>   wint_t __wch;
>   unsigned char __wchb[4];
> } __value;/* Value so far.  */
>   } _mbstate_t;
>
> If so, that means the type wint_t isn't defined, which should have been
> defined by  when __need_wint_t itself was defined before
> including it.  That in turn means you're using an old version of TCC,
> because commit 0961a384 from April 2014 fixed this.
>
> That is, update your TCC.
>
>
> Ciao,
> Michael.
>
> ___
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel

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


Re: [Tinycc-devel] Use TCC with GSL under Windows

2016-10-16 Thread Michael Matz

Hi,

On Sun, 16 Oct 2016, Chen, Xianwen wrote:

I'm using the latest release, but not the latest version as of the 
source code. Are you suggesting me to compile tcc itself from source 
codes?


Yes.


Ciao,
Michael.

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


Re: [Tinycc-devel] Use TCC with GSL under Windows

2016-10-14 Thread Michael Matz
Hi,

On Tue, 11 Oct 2016, Chen, Xianwen wrote:

> In file included from Bessel_Function.c:1:
> In file included from C:/cygwin64/usr/include//stdio.h:60:
> In file included from C:/cygwin64/usr/include//sys/reent.h:15:
> C:/cygwin64/usr/include//sys/_types.h:168: error: ',' expected (got "__wch")

>From a bit googling that's probably this typedef:

 typedef struct
 {
   int __count;
   union
   {
 wint_t __wch;
 unsigned char __wchb[4];
   } __value;/* Value so far.  */
 } _mbstate_t;

If so, that means the type wint_t isn't defined, which should have been 
defined by  when __need_wint_t itself was defined before 
including it.  That in turn means you're using an old version of TCC, 
because commit 0961a384 from April 2014 fixed this.

That is, update your TCC.


Ciao,
Michael.

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


Re: [Tinycc-devel] Use TCC with GSL under Windows

2016-10-11 Thread Chen, Xianwen
Dear Daniel,

Thank you. I have tried to:
x86_64-w64-mingw32-gcc -s -Os hello.c

Interestingly, the generated exe is now 18 KB. Still, that is larger than 2
KB. :-)

Warm regards,
Xianwen


On Wed, Oct 12, 2016 at 12:49 AM, Daniel Glöckner  wrote:

> Hi Xianwen,
>
> On Tue, Oct 11, 2016 at 11:43:40PM +0200, Chen, Xianwen wrote:
> > I have been very impressed by the size of exe's that TCC produces in
> > Windows. For the simple hello_world.c, TCC produces an exe of 2 KB, while
> > mingw-w64 produces an exe of 164 KB. Therefore, I would like to continue
> to
> > learn to use TCC.
>
> I'm pretty sure I've used MinGW to generate executables that small,
> although that was probably 16 years ago.
>
> Try to pass -s to GCC and don't use -g to get rid of symbol tables and
> debugging information. Most of the time TCC generates more code than GCC,
> especially when GCC is called with -Os.
>
> The linker of MinGW might enforce different section alignments than TCC.
> But that should add less than 10 kB of padding, regardless of the code
> size.
>
> Best regards,
>
>   Daniel
>
> ___
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Use TCC with GSL under Windows

2016-10-11 Thread Daniel Glöckner
Hi Xianwen,

On Tue, Oct 11, 2016 at 11:43:40PM +0200, Chen, Xianwen wrote:
> I have been very impressed by the size of exe's that TCC produces in
> Windows. For the simple hello_world.c, TCC produces an exe of 2 KB, while
> mingw-w64 produces an exe of 164 KB. Therefore, I would like to continue to
> learn to use TCC.

I'm pretty sure I've used MinGW to generate executables that small,
although that was probably 16 years ago.

Try to pass -s to GCC and don't use -g to get rid of symbol tables and
debugging information. Most of the time TCC generates more code than GCC,
especially when GCC is called with -Os.

The linker of MinGW might enforce different section alignments than TCC.
But that should add less than 10 kB of padding, regardless of the code
size.

Best regards,

  Daniel

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