Re: [Tinycc-devel] Crosscompiling

2014-06-27 Thread YX Hao
Have you consider that compiler searches its own header path and header files 
have environment switches.

 

Make it clear where “mexPrintf” is defined and why it is not effective.

 

  _  

From: tinycc-devel-bounces+lifenjoiner=163@nongnu.org 
[mailto:tinycc-devel-bounces+lifenjoiner=163@nongnu.org] On Behalf Of 
Markus Bergholz
Sent: Friday, June 27, 2014 1:16 AM
To: tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] Crosscompiling

 

 

 

On Tue, Jun 24, 2014 at 11:25 PM, grischka  wrote:

Markus Bergholz wrote:

I'd tried to compile tcc itself with build_cross="yes" and tried

 ./x86_64-win32-tcc -nostdinc -I /usr/x86_64-w64-mingw32/include/ 
../helloworld.c -o helloworld-gcc.exe

[...]


/usr/x86_64-w64-mingw32/include//vadefs.h:33: error: #error VARARGS not 
implemented for this compiler


If you love problems I know a lot of options that you can try. ;)

Otherwise

./configure --enabie-cross && make && make install
cd win32/examples
x86_64-win32-tcc -v hello_win.c

did work with 0.9.26.  And still should if it hasn't been broken.

--gr

 

Indeed, this works fine for hello_win.c

But the tcc crosscompiler said that mexprintf is undefined

$ tcc -v -I /usr/include/octave-3.8.1/octave/ -shared mexample.c -o mexample.mex
tcc version 0.9.26 (x86-64 Linux)
-> mexample.c
<- mexample.mex
$ x86_64-win32-tcc -v -I /usr/include/octave-3.8.1/octave/ -shared mexample.c 
-o mexample.mex
tcc version 0.9.26 (x86-64 Win64)
-> mexample.c
tcc: error: undefined symbol 'mexPrintf'
$ x86_64-win32-tcc -v -I ~/R2013a/extern/include/ -shared mexample.c -o 
mexample.mex
tcc version 0.9.26 (x86-64 Win64)
-> mexample.c
tcc: error: undefined symbol 'mexPrintf' 

And ideas why this just work with native tcc but not with tcc crosscompiler?

 

 



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




-- 
icq: 167498924
XMPP|Jabber: marku...@jabber.ccc.de 

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


[Tinycc-devel] What does 0xFF mean?

2014-06-27 Thread YX Hao
Hi there,

Character "0xFF" was found in file "COPYING", and it is hard to search the 
meaning without a proper keyword. I guess it has some meaning for non-win 
applications. Can anyone give an explanation? I am a win user, and view it by 
notepad2.

Regards




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


Re: [Tinycc-devel] What does 0xFF mean?

2014-06-27 Thread Vincent Lefevre
Hi,

On 2014-06-27 19:51:37 +0800, YX Hao wrote:
> Character "0xFF" was found in file "COPYING", and it is hard to
> search the meaning without a proper keyword. I guess it has some
> meaning for non-win applications. Can anyone give an explanation?
> I am a win user, and view it by notepad2.

There's no such character in this file. It could have been added by
your software.

I think I've already seen such a bug with some software, probably
because it wasn't detecting EOF (-1) correctly.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

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


Re: [Tinycc-devel] What does 0xFF mean?

2014-06-27 Thread YX Hao
Hi Vincent Lefevre,

I got it with the hex view.

It is "0C" means form feed in "0A 0C 0A" showed "FF" with dark back color that 
I made a misunderstanding.

Thanks!

> 
> Hi,
> 
> On 2014-06-27 19:51:37 +0800, YX Hao wrote:
> > Character "0xFF" was found in file "COPYING", and it is hard to
> > search the meaning without a proper keyword. I guess it has some
> > meaning for non-win applications. Can anyone give an explanation?
> > I am a win user, and view it by notepad2.
> 
> There's no such character in this file. It could have been added by
> your software.
> 
> I think I've already seen such a bug with some software, probably
> because it wasn't detecting EOF (-1) correctly.
> 



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


Re: [Tinycc-devel] What does 0xFF mean?

2014-06-27 Thread YX Hao
In addition,

> 
> Hi Vincent Lefevre,
> 
> I got it with the hex view.
> 
> It is "0C" means form feed in "0A 0C 0A" showed "FF" with dark back color that
> I made a misunderstanding.
> 
> Thanks!
> 
> >
> > Hi,
> >
> > On 2014-06-27 19:51:37 +0800, YX Hao wrote:
> > > Character "0xFF" was found in file "COPYING", and it is hard to
> > > search the meaning without a proper keyword. I guess it has some
> > > meaning for non-win applications. Can anyone give an explanation?
> > > I am a win user, and view it by notepad2.
> >
> > There's no such character in this file. It could have been added by
> > your software.
> >
> > I think I've already seen such a bug with some software, probably
> > because it wasn't detecting EOF (-1) correctly.

Even if it is a "0xFF", it should not be the EOF, though many people say it. 
You can make a file to test using my attachment. ;)

Regards,
YX


0xFF.c
Description: Binary data
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] What does 0xFF mean?

2014-06-27 Thread Vincent Lefevre
On 2014-06-27 21:32:06 +0800, YX Hao wrote:
> It is "0C" means form feed in "0A 0C 0A" showed "FF" with dark back
> color that I made a misunderstanding.

OK. I wonder why the FSF has put these Form Feed characters in this
file. Their other raw-text license files don't have them.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

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


[Tinycc-devel] incorrect/missing license files

2014-06-27 Thread Vincent Lefevre
TCC is distributed with a file "COPYING", corresponding to the
Lesser GPL. This is incorrect. Such a file is normally called
"COPYING.LIB", and "COPYING" should contain the GPL. This is
important because some files are distributed under the GPL only:

  il-opcodes.h
  lib/libtcc1.c
  texi2pod.pl
  win32/tools/tiny_impdef.c

Moreover the fact that there are some source files under the GPL
(il-opcodes.h, lib/libtcc1.c) cannot make TCC a Lesser GPL software
as claimed by the README file.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

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


Re: [Tinycc-devel] What does 0xFF mean?

2014-06-27 Thread Vincent Lefevre
On 2014-06-27 21:56:39 +0800, YX Hao wrote:
> > > I think I've already seen such a bug with some software, probably
> > > because it wasn't detecting EOF (-1) correctly.
> 
> Even if it is a "0xFF", it should not be the EOF, though many people
> say it. You can make a file to test using my attachment. ;)

Yes, that's why I say above that it is a bug. I think that some
developers *incorrectly* store the result of fgetc() to a char
instead of an int, in which case 0xFF can't be distinguished from
EOF.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

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


[Tinycc-devel] Status of my involvment in TinyCC

2014-06-27 Thread Thomas Preud'homme
Hi there,

I know this title sounds a bit egocentric but I thought some people might 
wonder why I am not very present here since a few months. The reason is that I 
recently joined a new company and they have a procedure to follow to be 
authorized to participate to outside projects. It shouldn't be a problem in my 
case but many busy persons are involved in the procedure and being in different 
time zone doesn't help. I also had difficult time to follow the new pace of 
this 
mailing list.

However be sure that I am still interested in tcc development and I will try 
to come back progressively into the discussion. I'll be travelling until july 
so expect a few more weeks without any intervention from me. I'll try to 
follow more closely patches for now and give comments on them.

My objective is that after I return from travelling I commit to give an answer 
about a patch within 7 days (I prefer not to commit too much instead of 
promising better and not be true to my words). As a consequence I suggest new 
comers to systematically post a patch for review and wait for a review before 
proceeding forward.

When sending a patch, please take the time to explain the reason for the patch 
(what are you trying to fix/improve) and the overall logic of the patch. If you 
feel your english level is too low, try to find someone to help you review the 
text as having difficulty to read a message doesn't motivate to read the code. 
I 
acknowledge that for some people english is very different from their native 
language but unfortunately the only language all the tcc developer read and 
write is english. I'd personnaly could read french but that wouldn't help many 
people and others could not read the message.

Best regards,

Thomas

signature.asc
Description: This is a digitally signed message part.
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Status of my involvment in TinyCC

2014-06-27 Thread Stephan Beal
On Fri, Jun 27, 2014 at 5:06 PM, Thomas Preud'homme 
wrote:

> I know this title sounds a bit egocentric but I thought some people might
>

FWIW, thanks and +1.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] incorrect/missing license files

2014-06-27 Thread Evan Langlois
Stupid legal question.   If TCC is GPL (rather than lesser GPL) and you
link with libtcc, then you would end up with software that was GPL.  This
may be significant.   Additionally, and start-up object files that TCC
generates may be considered "linking with tcc".

So ... anyone want to straighten this out?


On Fri, Jun 27, 2014 at 9:15 AM, Vincent Lefevre  wrote:

> TCC is distributed with a file "COPYING", corresponding to the
> Lesser GPL. This is incorrect. Such a file is normally called
> "COPYING.LIB", and "COPYING" should contain the GPL. This is
> important because some files are distributed under the GPL only:
>
>   il-opcodes.h
>   lib/libtcc1.c
>   texi2pod.pl
>   win32/tools/tiny_impdef.c
>
> Moreover the fact that there are some source files under the GPL
> (il-opcodes.h, lib/libtcc1.c) cannot make TCC a Lesser GPL software
> as claimed by the README file.
>
> --
> Vincent Lefèvre  - Web: 
> 100% accessible validated (X)HTML - Blog: 
> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
>
> ___
> 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] incorrect/missing license files

2014-06-27 Thread Vincent Lefevre
On 2014-06-27 11:30:54 -0500, Evan Langlois wrote:
> Stupid legal question.   If TCC is GPL (rather than lesser GPL) and you
> link with libtcc, then you would end up with software that was GPL.  This
> may be significant.   Additionally, and start-up object files that TCC
> generates may be considered "linking with tcc".

I'm not sure, due to the GPL system library exception.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

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


Re: [Tinycc-devel] Crosscompiling

2014-06-27 Thread Markus Bergholz
On Fri, Jun 27, 2014 at 1:30 PM, YX Hao  wrote:

>  Have you consider that compiler searches its own header path and header
> files have environment switches.
>
>
>
> Make it clear where “mexPrintf” is defined and why it is not effective.
>

"mexPrintf" is defined in /usr/include/octave-3.8.1/octave/mexproto.h
afaiu. So it is already in the include path. Any ideas?

grep mexPrintf /usr/include/octave-3.8.1/octave/*
/usr/include/octave-3.8.1/octave/mexproto.h:extern OCTINTERP_API int
mexPrintf (const char *fmt, ...);
/usr/include/octave-3.8.1/octave/mexproto.h:  mexPrintf
("Assertion failed: %s, at line %d of file \"%s\".\n%s\n", \
/usr/include/octave-3.8.1/octave/mexproto.h:  mexPrintf
("Assertion failed at line %d of file \"%s\".\n%s\n", \




>
>   --
>
> *From:* tinycc-devel-bounces+lifenjoiner=163@nongnu.org [mailto:
> tinycc-devel-bounces+lifenjoiner=163@nongnu.org] *On Behalf Of *Markus
> Bergholz
> *Sent:* Friday, June 27, 2014 1:16 AM
> *To:* tinycc-devel@nongnu.org
> *Subject:* Re: [Tinycc-devel] Crosscompiling
>
>
>
>
>
>
>
> On Tue, Jun 24, 2014 at 11:25 PM, grischka  wrote:
>
> Markus Bergholz wrote:
>
> I'd tried to compile tcc itself with build_cross="yes" and tried
>
>  ./x86_64-win32-tcc -nostdinc -I /usr/x86_64-w64-mingw32/include/
> ../helloworld.c -o helloworld-gcc.exe
>
> [...]
>
>
> /usr/x86_64-w64-mingw32/include//vadefs.h:33: error: #error VARARGS not
> implemented for this compiler
>
>
> If you love problems I know a lot of options that you can try. ;)
>
> Otherwise
>
> ./configure --enabie-cross && make && make install
> cd win32/examples
> x86_64-win32-tcc -v hello_win.c
>
> did work with 0.9.26.  And still should if it hasn't been broken.
>
> --gr
>
>
>
> Indeed, this works fine for hello_win.c
>
> But the tcc crosscompiler said that mexprintf is undefined
>
> $ tcc -v -I /usr/include/octave-3.8.1/octave/ -shared mexample.c -o
> mexample.mex
> tcc version 0.9.26 (x86-64 Linux)
> -> mexample.c
> <- mexample.mex
> $ x86_64-win32-tcc -v -I /usr/include/octave-3.8.1/octave/ -shared
> mexample.c -o mexample.mex
> tcc version 0.9.26 (x86-64 Win64)
> -> mexample.c
> tcc: error: undefined symbol 'mexPrintf'
> $ x86_64-win32-tcc -v -I ~/R2013a/extern/include/ -shared mexample.c -o
> mexample.mex
> tcc version 0.9.26 (x86-64 Win64)
> -> mexample.c
> tcc: error: undefined symbol 'mexPrintf'
>
> And ideas why this just work with native tcc but not with tcc
> crosscompiler?
>
>
>
>
>
>
>
> ___
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
>
>
>
> --
> icq: 167498924
> XMPP|Jabber: marku...@jabber.ccc.de
>
> ___
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
>


-- 
icq: 167498924
XMPP|Jabber: marku...@jabber.ccc.de
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Crosscompiling

2014-06-27 Thread YX Hao
Hi,

> Markus Bergholz
> Sent: Saturday, June 28, 2014 2:55 AM
> 
> On Fri, Jun 27, 2014 at 1:30 PM, YX Hao  wrote:
> 
> 
>   Have you consider that compiler searches its own header path and header
> files have environment switches.
> 
^
Read the whole file and check the switches for preprocess.
For example: "#ifdef ...", "#ifndef ...", "#if ..."
TCC's "-E" option could help.

> 
> 
>   Make it clear where “mexPrintf” is defined and why it is not effective.
> 
> 
> "mexPrintf" is defined in /usr/include/octave-3.8.1/octave/mexproto.h afaiu.
> So it is already in the include path. Any ideas?
> 
> grep mexPrintf /usr/include/octave-3.8.1/octave/*
> /usr/include/octave-3.8.1/octave/mexproto.h:extern OCTINTERP_API int
> mexPrintf (const char *fmt, ...);
> /usr/include/octave-3.8.1/octave/mexproto.h:  mexPrintf
> ("Assertion failed: %s, at line %d of file \"%s\".\n%s\n", \
> /usr/include/octave-3.8.1/octave/mexproto.h:  mexPrintf
> ("Assertion failed at line %d of file \"%s\".\n%s\n", \
> 



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


Re: [Tinycc-devel] Mob has been reverted

2014-06-27 Thread Thomas Preud'homme
Le mardi 24 juin 2014, 23:06:50 David Mertens a écrit :
> Hey everyone,
> 

> 
> This, at least, is what I intended to do. I would appreciate if others
> could double-check that I performed the cherry picking and merging
> correctly. I do not perform this sort of work often.

Looks correct on my side. Thanks for doing this.

> 
> This reversion does not invalidate jiang's work. *jiang has demonstrated
> tremendous enthusiasm for improving tcc, and I think everybody here
> appreciates that enthusiasm*. The problem is that jiang did not discuss the
> changes with the mailing list before pushing them. jiang, please filter
> your future contributions through a conversation on the mailing list before
> committing your work to mob. In the end, everybody will be happier with the
> result! :-)

Agreed, it would be preferable that new comers post patches on mailing list 
and wait for some review before commiting them. I know that I may not have 
been involved in tcc if it was not for the relaxed rules on the mob branch and 
I certainly wrote some incorrect code (and still does of course albeit less 
often I hope). But it seems some people have some difficulties assessing the 
quality of their code. I perfectly understand that it is difficult to be 
neutral 
with one's own code which is exactly I encourage people to pass some kind of 
review first.

Grischka, I'm certainly not expecting you to do all the work. Even if I'm too 
slow to process patches, please refrain from processing all of them. You are 
the most experienced on tcc's code base and I really don't want you to burn 
out. Also, I'm not going to improve at code review if you review everything ;)

Best regards,

Thomas

signature.asc
Description: This is a digitally signed message part.
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel