Re: [Tinycc-devel] [PATCH] Don't break compilation process with unknow option
I'm agree. But what to do with the described bug? How to fix it? cd tcc-source ./configure --cc=tcc; make; make install; make test tcc -o tcctest.cc tcctest.c -I.. -I.. -w -DTCC_TARGET_I386 -std=gnu99 -O0 -fno-omit-frame-pointer tcc: error: invalid option -- '-std=gnu99' 2015-01-07 9:08 GMT+03:00, Michael Matz matz@frakked.de: Am 07.01.2015 um 04:14 schrieb Sergey Korshunoff: After applying a disable DTEST patch to allow make test to pass a broken tests... ./configure --cc=tcc; make; make install; make test tcc -o tcctest.cc tcctest.c -I.. -I.. -w -DTCC_TARGET_I386 -std=gnu99 -O0 -fno-omit-frame-pointer tcc: error: invalid option -- '-std=gnu99' With a patch apllied a test can be performed with make CFLAGS=-Wunsuported test And your solution? The makefile (and/or configure) needs to be fixed to not hardcode potentially unknown compiler options. What you will add to CFLAGS? Nothing. The only sensible thing that tcc can to with completely unknown options is to error out on them. It can't simply ignore them, not even with a warning as the unknown option in question might have significant effects for code generation for a compiler understanding it (-std=gnu99 is on the border of being such option) and the author might _require_ that effect to happen for his compilations. Ignoring it would either generate unnecessary followup errors or silently generate code with the wrong semantics, which is worse. There is a case to be made to only warn for unknown options that influence diagnostics only. As it's unknown it's of course hard to know when exactly that is the case. If it starts with -W that might be a good enough heuristic in practice, so I'm with Thomas on this topic. If you absolutely hate fixing makefiles/configures for trying out tcc, instead of patching tcc to ignore all unkown options you could also simply write a wrapper script that removes _known_ unknown options that you happen to hit when you know they indeed aren't important. 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] [PATCH] libtcc.c (put_extern_sym2): Extend the scope of buf to match its use
On Sun, Jan 4, 2015 at 5:26 AM, Thomas Preud'homme robo...@celest.fr wrote: Le jeudi 18 décembre 2014, 20:00:02 David Mertens a écrit : Good catch. I'm not closely acquainted with this particular section of code, but your observation looks correct to me, and the fix looks right. I have 2 minor nitpick though (I know it's already commited). First, with that change buf is no longer declared at the start of a block (C89 style) and this is the coding style used in tcc. Second, it would be more consistent and clearer to declare it in the same scope as name since they are both used in the same scope. Good point. I will fix this later. Sincerely, Lee ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
[Tinycc-devel] install: cannot stat 'x86_64-tcc'
./configure --cc=tcc; make; make install install: cannot stat 'x86_64-tcc' install: cannot stat 'i386-win32-tcc' install: cannot stat 'x86_64-win32-tcc' install: cannot stat 'arm-fpa-tcc' install: cannot stat 'arm-fpa-ld-tcc' install: cannot stat 'arm-vfp-tcc' install: cannot stat 'arm-eabi-tcc' What this means? ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] [PATCH] current set of patches which I want to upload
There is a version 2015-01-08 of patches. SInce 2015-01-07: * a patch make-test-if-cc-tcc is removed. It was included by mistake * a patches for the new 2 problems are included: - a current tcc don't understand a declaration of the external array of structs - initialization of the empty struct 2015-01-07 14:02 GMT+03:00, Sergey Korshunoff sey...@gmail.com: Any suggestions? tcc can compile a nimrod compiler with thise patches applied tinyc-patches-2015-01-08.tgz Description: GNU Zip compressed data ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] [PATCH] Don't break compilation process with unknow option
Am 07.01.2015 um 11:22 schrieb Sergey Korshunoff: I'm agree. But what to do with the described bug? How to fix it? cd tcc-source ./configure --cc=tcc; make; make install; make test tcc -o tcctest.cc tcctest.c -I.. -I.. -w -DTCC_TARGET_I386 -std=gnu99 -O0 -fno-omit-frame-pointer tcc: error: invalid option -- '-std=gnu99' Multiple solutions: * declare this a non-problem by requiring that the reference compiler in the testsuite has to be GCC (in that case configure could perhaps error out if CC != tcc). * if tcc is to be accepted as test reference then the Makefile and possibly configure need to be changed to not pass -std=gnu99 to it without checking if it is accepted (I don't have tcc code here to say if it's only the Makefile that hardcodes that option, or if it comes from configure). Ciao, Michael. ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] how to fix such a error ?
On Fri, Jan 2, 2015 at 10:51 AM, z_axis z_a...@163.com wrote: On a freebsd-9.3 box, the newest tcc reports: /usr/include/stdio.h:63: error: ';' expected (got va_list) In stdio.h #if __BSD_VISIBLE || __POSIX_VISIBLE = 200112 || __XSI_VISIBLE #ifndef _VA_LIST_DECLARED typedef __va_list va_list;--- line 63 #define _VA_LIST_DECLARED #endif #endif I cannot reproduce your problem. Could you offer a self-included header file or C source file that can be used to reproduce your problem? Sincerely, Lee ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
[Tinycc-devel] [PATCH] current set of patches which I want to upload
Any suggestions? tcc can compile a nimrod compiler with thise patches applied tinyc-patches-2015-01-07.tgz Description: GNU Zip compressed data ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] [PATCH 3/4] Makefile: Add rules to create tags and TAGS.
On Sun, Jan 4, 2015 at 4:42 AM, Thomas Preud'homme robo...@celest.fr wrote: Le mercredi 26 novembre 2014, 16:06:14 Lee Duhem a écrit : Hi, This patch adds rules to create and remove tags files. Hi Lee, Sorry for the delay but why not use etags rather than ctags -e to create the TAGS file? Two reasons: 1. etags cannot handle some abnormal definitions which ctags has no problem with; 2. because I need both of tags and TAGS, and ctags can generate TAGS, so it seems to me there is no point to add another dependence. Of course, this may not apply to others. Sincerely, Lee ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] [PATCH] Addition to a pacth: Don't drop a preprocessor defines
I have a few questions A revised patch is in current set of patches which I want to upload. ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] TCC's preprocessor for other use?
On 1/8/2015 1:05 AM, Kevin Ingwersen (Ingwie Phoenix) wrote: I am working on a project that involves AngelScript, which is a C++ like scripting language. But I wanted to add a preprocessor to it. Is it possible to embed TCC’s preprocessor into another app? I have never seen TCC running an external process for preprocessing files, which is why I believe that it must be inside it entirely. This may be a better option: http://mcpp.sourceforge.net/ -- Cheers, Kein-Hong Man (esq.) Kuala Lumpur, Malaysia ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel