Re: [Tinycc-devel] Fwd: Use CString to concat linker options
Thomas Preud'homme wrote: About the cstr_*, are they now part of the library on Windows? I mean if they are exported some people might start to use them, no? Same thing with pstrcat or tcc_realloc as in your original patch. As to "some people" they hopefully know the meaning of 'undocumented feature'. --- grischka ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Fwd: Use CString to concat linker options
Le mercredi 18 avril 2012 19:01:35, grischka a écrit : > Gabriel Corneanu wrote: > > Hi, > > I had the same problem. > > Why don't you just modify build-tcc.bat to build tcc with > > "-DONE_SOURCE" also (just like libtcc)? > > Which may fix YOUR problem but doesn't fix THE problem. > > Anyway, since the CString wasn't zero-terminated either, I decided > to do my contribution to this story, also: > > http://repo.or.cz/w/tinycc.git/commitdiff/4274c44de7dfb99a1058a5af515e9865c > c9d2ff9 Ouch, I guess I thought the nul byte was systematically added or maybe I just forgot. Thanks. I saw a cstr_new at the top, did I forget it when reverting? Damn me. About the cstr_*, are they now part of the library on Windows? I mean if they are exported some people might start to use them, no? > > --- grischka Best regards, Thomas Preud'homme > > ___ > Tinycc-devel mailing list > Tinycc-devel@nongnu.org > https://lists.nongnu.org/mailman/listinfo/tinycc-devel 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] Fwd: Use CString to concat linker options
Gabriel Corneanu wrote: Hi, I had the same problem. Why don't you just modify build-tcc.bat to build tcc with "-DONE_SOURCE" also (just like libtcc)? Which may fix YOUR problem but doesn't fix THE problem. Anyway, since the CString wasn't zero-terminated either, I decided to do my contribution to this story, also: http://repo.or.cz/w/tinycc.git/commitdiff/4274c44de7dfb99a1058a5af515e9865cc9d2ff9 --- grischka ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Fwd: Use CString to concat linker options
Le mercredi 11 avril 2012 11:14:27, Gabriel Corneanu a écrit : > Hi, > I had the same problem. > Why don't you just modify build-tcc.bat to build tcc with > "-DONE_SOURCE" also (just like libtcc)? I assumed there was a reason to this difference. I don't know Windows well enough to be sure of what I am doing. So if someone *know* it's fine to build both with ONE_SOURCE then please change it. > > I also have a simple change request; can someone add this simple patch > to add "nostdlib" to libtcc? > Or is there anything against it? > > Regards, > Gabriel Best regards, Thomas Preud'homme 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] Fwd: Use CString to concat linker options
Hi, I had the same problem. Why don't you just modify build-tcc.bat to build tcc with "-DONE_SOURCE" also (just like libtcc)? I also have a simple change request; can someone add this simple patch to add "nostdlib" to libtcc? Or is there anything against it? Regards, Gabriel On Tue, Apr 10, 2012 at 4:37 PM, Thomas Preud'homme wrote: > Le lundi 9 avril 2012 23:52:42, Thomas Preud'homme a écrit : >> Le lundi 9 avril 2012 23:48:45, Daniel Glöckner a écrit : >> > On Mon, Apr 09, 2012 at 05:39:48PM +0200, Thomas Preud'homme wrote: >> > > A few days ago[0] I received an email from someone who can't compile >> > > tcc since I introduce the use of CString to concat linker options. >> > > Unfortunetely, I cannot reproduce this bug. Can anyone with Windows >> > > reproduce it? >> > >> > On Mon, Apr 05, 2012 at 09:23:07AM -0700, Lance Mason wrote: >> > > C:\WINDOWS\Users\ADMINI~1\Temp\ccdQYZqL.o:tcc.c:(.text+0x64): undefined >> > > referenc e to `cstr_new' >> > > C:\WINDOWS\Users\ADMINI~1\Temp\ccdQYZqL.o:tcc.c:(.text+0x427): >> > > undefined referen ce to `cstr_ccat' >> > > C:\WINDOWS\Users\ADMINI~1\Temp\ccdQYZqL.o:tcc.c:(.text+0x437): >> > > undefined referen ce to `cstr_cat' >> > > C:\WINDOWS\Users\ADMINI~1\Temp\ccdQYZqL.o:tcc.c:(.text.startup+0x416): >> > > undefined reference to `cstr_free' >> > > collect2: ld returned 1 exit status >> > >> > The build-tcc.bat batch file builds libtcc with -DONE_SOURCE, which >> > makes the cstr_* functions static, so they are not found when tcc.exe >> > is linked. >> > >> > Daniel >> > >> > ___ >> > Tinycc-devel mailing list >> > Tinycc-devel@nongnu.org >> > https://lists.nongnu.org/mailman/listinfo/tinycc-devel >> >> Thanks. I can then work on a fix tomorrow. >> >> Thomas Preud'homme > > Except creating a public function to do the concatenation in libtcc.c, I > couldn't find any solution. I thus reverted the last commit. > > Best regards, > > Thomas Preud'homme > > ___ > Tinycc-devel mailing list > Tinycc-devel@nongnu.org > https://lists.nongnu.org/mailman/listinfo/tinycc-devel > libtcc.patch Description: Binary data ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Fwd: Use CString to concat linker options
Le lundi 9 avril 2012 23:52:42, Thomas Preud'homme a écrit : > Le lundi 9 avril 2012 23:48:45, Daniel Glöckner a écrit : > > On Mon, Apr 09, 2012 at 05:39:48PM +0200, Thomas Preud'homme wrote: > > > A few days ago[0] I received an email from someone who can't compile > > > tcc since I introduce the use of CString to concat linker options. > > > Unfortunetely, I cannot reproduce this bug. Can anyone with Windows > > > reproduce it? > > > > On Mon, Apr 05, 2012 at 09:23:07AM -0700, Lance Mason wrote: > > > C:\WINDOWS\Users\ADMINI~1\Temp\ccdQYZqL.o:tcc.c:(.text+0x64): undefined > > > referenc e to `cstr_new' > > > C:\WINDOWS\Users\ADMINI~1\Temp\ccdQYZqL.o:tcc.c:(.text+0x427): > > > undefined referen ce to `cstr_ccat' > > > C:\WINDOWS\Users\ADMINI~1\Temp\ccdQYZqL.o:tcc.c:(.text+0x437): > > > undefined referen ce to `cstr_cat' > > > C:\WINDOWS\Users\ADMINI~1\Temp\ccdQYZqL.o:tcc.c:(.text.startup+0x416): > > > undefined reference to `cstr_free' > > > collect2: ld returned 1 exit status > > > > The build-tcc.bat batch file builds libtcc with -DONE_SOURCE, which > > makes the cstr_* functions static, so they are not found when tcc.exe > > is linked. > > > > Daniel > > > > ___ > > Tinycc-devel mailing list > > Tinycc-devel@nongnu.org > > https://lists.nongnu.org/mailman/listinfo/tinycc-devel > > Thanks. I can then work on a fix tomorrow. > > Thomas Preud'homme Except creating a public function to do the concatenation in libtcc.c, I couldn't find any solution. I thus reverted the last commit. Best regards, Thomas Preud'homme 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] Fwd: Use CString to concat linker options
Le lundi 9 avril 2012 23:48:45, Daniel Glöckner a écrit : > On Mon, Apr 09, 2012 at 05:39:48PM +0200, Thomas Preud'homme wrote: > > A few days ago[0] I received an email from someone who can't compile tcc > > since I introduce the use of CString to concat linker options. > > Unfortunetely, I cannot reproduce this bug. Can anyone with Windows > > reproduce it? > > On Mon, Apr 05, 2012 at 09:23:07AM -0700, Lance Mason wrote: > > C:\WINDOWS\Users\ADMINI~1\Temp\ccdQYZqL.o:tcc.c:(.text+0x64): undefined > > referenc e to `cstr_new' > > C:\WINDOWS\Users\ADMINI~1\Temp\ccdQYZqL.o:tcc.c:(.text+0x427): undefined > > referen ce to `cstr_ccat' > > C:\WINDOWS\Users\ADMINI~1\Temp\ccdQYZqL.o:tcc.c:(.text+0x437): undefined > > referen ce to `cstr_cat' > > C:\WINDOWS\Users\ADMINI~1\Temp\ccdQYZqL.o:tcc.c:(.text.startup+0x416): > > undefined reference to `cstr_free' > > collect2: ld returned 1 exit status > > The build-tcc.bat batch file builds libtcc with -DONE_SOURCE, which > makes the cstr_* functions static, so they are not found when tcc.exe > is linked. > > Daniel > > ___ > Tinycc-devel mailing list > Tinycc-devel@nongnu.org > https://lists.nongnu.org/mailman/listinfo/tinycc-devel Thanks. I can then work on a fix tomorrow. Thomas Preud'homme 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] Fwd: Use CString to concat linker options
On Mon, Apr 09, 2012 at 05:39:48PM +0200, Thomas Preud'homme wrote: > A few days ago[0] I received an email from someone who can't compile tcc > since > I introduce the use of CString to concat linker options. Unfortunetely, I > cannot reproduce this bug. Can anyone with Windows reproduce it? On Mon, Apr 05, 2012 at 09:23:07AM -0700, Lance Mason wrote: > C:\WINDOWS\Users\ADMINI~1\Temp\ccdQYZqL.o:tcc.c:(.text+0x64): undefined > referenc > e to `cstr_new' > C:\WINDOWS\Users\ADMINI~1\Temp\ccdQYZqL.o:tcc.c:(.text+0x427): undefined > referen > ce to `cstr_ccat' > C:\WINDOWS\Users\ADMINI~1\Temp\ccdQYZqL.o:tcc.c:(.text+0x437): undefined > referen > ce to `cstr_cat' > C:\WINDOWS\Users\ADMINI~1\Temp\ccdQYZqL.o:tcc.c:(.text.startup+0x416): > undefined > reference to `cstr_free' > collect2: ld returned 1 exit status The build-tcc.bat batch file builds libtcc with -DONE_SOURCE, which makes the cstr_* functions static, so they are not found when tcc.exe is linked. Daniel ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel