Try this :

https://github.com/JHRobotics/nocrt

Regards.

----- Mail d'origine -----
De: david koch <david.k...@libertysurf.fr>
À: tinycc-devel@nongnu.org
Cc: avih <avih...@yahoo.com>
Envoyé: Sat, 09 Sep 2023 20:41:15 +0200 (CEST)
Objet: Re : Re: [Tinycc-devel] win32: -Wl,-nostdlib: undefined symbol 'memset'

Hi,

I think you got it all wrong, please reread how a compiler work.

The stdlib is just a glue/wrapper to the underlying operating system, here 
Windows or Linux.

But what about an embedded/osless environment ? You provide your own stdlib in 
that case.

Hence TCC's purpose is not to provide its own 'stdlib' if you specifically 
request not to.

'memset' is one of the many functions you have to stub with your own 
implementation.

Good luck with that.

Regards.


----- Mail d'origine -----
De: avih via Tinycc-devel <tinycc-devel@nongnu.org>
À: tinycc-devel@nongnu.org
Cc: avih <avih...@yahoo.com>
Envoyé: Sat, 09 Sep 2023 19:54:08 +0200 (CEST)
Objet: Re: [Tinycc-devel] win32: -Wl,-nostdlib: undefined symbol 'memset'

 I don't think that's a valid argument.

This is plain C code which on its own doesn't require the standard library,
so I don't think the user should provide an alternative standard library
implementation just so that the startup code which tcc uses can be linked.

Today it seems that only `memset` is missing, but what if tomorrow the startup
code also wants some other stdlib functions?

I don't think the user should be responsible for this and/or track the 
requirements.

Instead, in cases where stdlib is not linked, I think tcc should use its own
implementations as needed. In this case a trivial memset is a two LOC function.

- avih
     On Saturday, September 9, 2023 at 08:02:25 PM GMT+3, <wine....@web.de> 
wrote:  
 
 you tell tcc to ignore the std c library during linking, so you have to
provide an implementation yourself.
tcc uses memset to init  'buf'


_______________________________________________
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

Reply via email to