<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinycc/win32/lib/wincrt1.c, branch main</title>
<subtitle>Tiny C Compiler by Fabrice Bellard Git mirror of the final release by Bellard, discarding all changes after. The repository at https://repo.or.cz/tinycc.git has become untrustworthy. Also the tcc sources have become tainted with AI slop.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/'/>
<entry>
<title>various stuff</title>
<updated>2017-10-11T16:13:43+00:00</updated>
<author>
<name>grischka</name>
<email>grischka</email>
</author>
<published>2017-10-11T16:13:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=da8c62f75d893449e232944fc62566c020b4d010'/>
<id>da8c62f75d893449e232944fc62566c020b4d010</id>
<content type='text'>
win32/Makefile ("for cygwin") removed
- On cygwin, the normal ./configure &amp;&amp; make can be used with either
  cygwin's "GCC for Win32 Toolchain"
      ./configure --cross-prefix=i686-w64-mingw32-
  or with an existing tcc:
      ./configure --cc=&lt;old-tccdir&gt;/tcc.exe

tcctest.c:
- exclude test_high_clobbers() on _WIN64 (does not work)

tests2/95_bitfield.c:
- use 'signed char' for ARM (where default 'char' is unsigned)

tests:
- remove -I "expr" diff option to allow tests with
  busybox-diff.

libtcc.c, tcc.c:
- removed -iwithprefix option.  It is supposed to be
  combined with -iprefix which we don't have either.

tccgen.c:
- fix assignments and return of 'void', as in
     void f() {
         void *p, *q;
         *p = *q:
         return *p;
     }
  This appears to be allowed but should do nothing.

tcc.h, libtcc.c, tccpp.c:
- Revert "Introduce VIP sysinclude paths which are always searched first"
  This reverts commit 1d5e386b0a78393ac6b670c209a185849ec798a1.

  The patch was giving tcc's system includes priority over -I which
  is not how it should be.

tccelf.c:
- add DT_TEXTREL tag only if text relocations are actually
  used (which is likely not the case on x86_64)
- prepare_dynamic_rel(): avoid relocation of unresolved
  (weak) symbols

tccrun.c:
- for HAVE_SELINUX, use two mappings to the same (real) file.
  (it was so once except the RX mapping wasn't used at all).

tccpe.c:
- fix relocation constant used for x86_64 (by Andrei E. Warentin)
- #ifndef _WIN32 do "chmod 755 ..." to get runnable exes on cygwin.

tccasm.c:
- keep forward asm labels static, otherwise they will endup
  in dynsym eventually.

configure, Makefile:
- mingw32: respect ./configure options --bindir --docdir --libdir
- allow overriding tcc when building libtcc1.a and libtcc.def with
      make XTCC=&lt;tcc program to use&gt;
- use $(wildcard ...) for install to allow installing just
  a cross compiler for example
      make cross-arm
      make install
- use name &lt;target&gt;-libtcc1.a

build-tcc.bat:
- add  options: -clean, -b bindir
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
win32/Makefile ("for cygwin") removed
- On cygwin, the normal ./configure &amp;&amp; make can be used with either
  cygwin's "GCC for Win32 Toolchain"
      ./configure --cross-prefix=i686-w64-mingw32-
  or with an existing tcc:
      ./configure --cc=&lt;old-tccdir&gt;/tcc.exe

tcctest.c:
- exclude test_high_clobbers() on _WIN64 (does not work)

tests2/95_bitfield.c:
- use 'signed char' for ARM (where default 'char' is unsigned)

tests:
- remove -I "expr" diff option to allow tests with
  busybox-diff.

libtcc.c, tcc.c:
- removed -iwithprefix option.  It is supposed to be
  combined with -iprefix which we don't have either.

tccgen.c:
- fix assignments and return of 'void', as in
     void f() {
         void *p, *q;
         *p = *q:
         return *p;
     }
  This appears to be allowed but should do nothing.

tcc.h, libtcc.c, tccpp.c:
- Revert "Introduce VIP sysinclude paths which are always searched first"
  This reverts commit 1d5e386b0a78393ac6b670c209a185849ec798a1.

  The patch was giving tcc's system includes priority over -I which
  is not how it should be.

tccelf.c:
- add DT_TEXTREL tag only if text relocations are actually
  used (which is likely not the case on x86_64)
- prepare_dynamic_rel(): avoid relocation of unresolved
  (weak) symbols

tccrun.c:
- for HAVE_SELINUX, use two mappings to the same (real) file.
  (it was so once except the RX mapping wasn't used at all).

tccpe.c:
- fix relocation constant used for x86_64 (by Andrei E. Warentin)
- #ifndef _WIN32 do "chmod 755 ..." to get runnable exes on cygwin.

tccasm.c:
- keep forward asm labels static, otherwise they will endup
  in dynsym eventually.

configure, Makefile:
- mingw32: respect ./configure options --bindir --docdir --libdir
- allow overriding tcc when building libtcc1.a and libtcc.def with
      make XTCC=&lt;tcc program to use&gt;
- use $(wildcard ...) for install to allow installing just
  a cross compiler for example
      make cross-arm
      make install
- use name &lt;target&gt;-libtcc1.a

build-tcc.bat:
- add  options: -clean, -b bindir
</pre>
</div>
</content>
</entry>
<entry>
<title>Win: crt, initialize global __argc, __targv and _tenviron of msvcrt</title>
<updated>2017-10-10T12:39:05+00:00</updated>
<author>
<name>YX Hao</name>
<email>lifenjoiner@163.com</email>
</author>
<published>2017-10-08T09:28:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=faa9744f5d13c94c7298bf08e8d1eedca5db88a9'/>
<id>faa9744f5d13c94c7298bf08e8d1eedca5db88a9</id>
<content type='text'>
_tenviron: as far as possible, not in ASC '-run' mode.
__argc and __targv are shortcuts for _tWinMain, when you want to use program parameters.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
_tenviron: as far as possible, not in ASC '-run' mode.
__argc and __targv are shortcuts for _tWinMain, when you want to use program parameters.
</pre>
</div>
</content>
</entry>
<entry>
<title>tcc: re-enable correct option -r support</title>
<updated>2017-02-20T17:58:08+00:00</updated>
<author>
<name>grischka</name>
<email>grischka</email>
</author>
<published>2017-02-20T17:58:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=5f33d313c8a2455ff9036cd7f7028339bdbde622'/>
<id>5f33d313c8a2455ff9036cd7f7028339bdbde622</id>
<content type='text'>
Forgot about it.  It allows to compile several
sources (and other .o's) to one single .o file;

    tcc -r -o all.o f1.c f2.c f3.S o4.o ...

Also:
- option -fold-struct-init-code removed, no effect anymore
- (tcc_)set_environment() moved to tcc.c
- win32/lib/(win)crt1 minor fix &amp; add dependency
- debug line output for asm (tcc -c -g xxx.S) enabled
- configure/Makefiles: x86-64 -&gt; x86_64 changes
- README: cleanup
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Forgot about it.  It allows to compile several
sources (and other .o's) to one single .o file;

    tcc -r -o all.o f1.c f2.c f3.S o4.o ...

Also:
- option -fold-struct-init-code removed, no effect anymore
- (tcc_)set_environment() moved to tcc.c
- win32/lib/(win)crt1 minor fix &amp; add dependency
- debug line output for asm (tcc -c -g xxx.S) enabled
- configure/Makefiles: x86-64 -&gt; x86_64 changes
- README: cleanup
</pre>
</div>
</content>
</entry>
<entry>
<title>win32: adjust new unicode support</title>
<updated>2017-02-18T08:51:23+00:00</updated>
<author>
<name>grischka</name>
<email>grischka</email>
</author>
<published>2017-02-18T08:51:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=096125d963400951e0f160ced86416ef8c9c98b0'/>
<id>096125d963400951e0f160ced86416ef8c9c98b0</id>
<content type='text'>
- lib/Makefile: add (win)crt1_w.o

- crt1.c/_runtmain: return to tcc &amp; only use for UNICODE
  (because it might be not 100% reliable with for example
  wildcards (tcc *.c -run ...)

- tccrun.c/tccpe.c: load -run startup_code only if called
  from tcc_run(). Otherwise main may not be defined.  See
  libtcc_test.c

- tests2/Makefile: pass extra options in FLAGS to allow
  overriding TCC

Also:
- tccpe.c: support weak attribute.  (I first tried to solve
  the problem above by using it but then didn't)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- lib/Makefile: add (win)crt1_w.o

- crt1.c/_runtmain: return to tcc &amp; only use for UNICODE
  (because it might be not 100% reliable with for example
  wildcards (tcc *.c -run ...)

- tccrun.c/tccpe.c: load -run startup_code only if called
  from tcc_run(). Otherwise main may not be defined.  See
  libtcc_test.c

- tests2/Makefile: pass extra options in FLAGS to allow
  overriding TCC

Also:
- tccpe.c: support weak attribute.  (I first tried to solve
  the problem above by using it but then didn't)
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for Unicode entries 'wmain' and 'wWinMain' on Windows</title>
<updated>2017-02-17T13:09:26+00:00</updated>
<author>
<name>YX Hao</name>
<email>lifenjoiner@163.com</email>
</author>
<published>2017-02-15T13:58:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=86e3cd0c5ac9d6e8e80306f9f5fdcce4a4c38dc5'/>
<id>86e3cd0c5ac9d6e8e80306f9f5fdcce4a4c38dc5</id>
<content type='text'>
'-run' suported. argvs are converted.
But don't use compliled Unicode CLI exe-file to get inputs interactively in other codepage!
Please add other compliling supports than 'build-tcc.bat' (Who is good at them).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'-run' suported. argvs are converted.
But don't use compliled Unicode CLI exe-file to get inputs interactively in other codepage!
Please add other compliling supports than 'build-tcc.bat' (Who is good at them).
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove misc. files</title>
<updated>2016-10-01T18:27:41+00:00</updated>
<author>
<name>grischka</name>
<email>grischka</email>
</author>
<published>2016-10-01T18:27:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=8637c1d0ad08d28052efc1de5c38b63acd2c08fc'/>
<id>8637c1d0ad08d28052efc1de5c38b63acd2c08fc</id>
<content type='text'>
- from win32/include/winapi: various .h

  The winapi header set cannot be complete no matter what.  So
  lets have just the minimal set necessary to compile the examples.

- remove CMake support (hard to keep up to date)
- some other files

Also, drop useless changes in win32/lib/(win)crt1.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- from win32/include/winapi: various .h

  The winapi header set cannot be complete no matter what.  So
  lets have just the minimal set necessary to compile the examples.

- remove CMake support (hard to keep up to date)
- some other files

Also, drop useless changes in win32/lib/(win)crt1.c
</pre>
</div>
</content>
</entry>
<entry>
<title>wincrt1.c: add definition of the __TRY__ if not defined</title>
<updated>2015-03-03T19:35:33+00:00</updated>
<author>
<name>seyko</name>
<email>seyko2@gmail.com</email>
</author>
<published>2015-03-03T19:35:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=dfbb00c1062849de5e3489359e17c318d4134d16'/>
<id>dfbb00c1062849de5e3489359e17c318d4134d16</id>
<content type='text'>
Some i686-pc-mingw32-gcc don't know about __TRY__
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some i686-pc-mingw32-gcc don't know about __TRY__
</pre>
</div>
</content>
</entry>
<entry>
<title>i386-gen: preserve fp control word in gen_cvt_ftoi</title>
<updated>2013-08-28T20:55:05+00:00</updated>
<author>
<name>grischka</name>
<email>grischka</email>
</author>
<published>2013-08-28T20:55:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=73faaea227a53e365dd75f1dba7a5071c7b5e541'/>
<id>73faaea227a53e365dd75f1dba7a5071c7b5e541</id>
<content type='text'>
- Use runtime function for conversion
- Also initialize fp with tcc -run on windows

This fixes a bug where
  double x = 1.0;
  double y = 1.0000000000000001;
  double z = x &lt; y ? 0 : sqrt (x*x - y*y);
caused a bad sqrt because rounding precision for the x &lt; y comparison
was different to the one used within the sqrt function.

This also fixes a bug where
  printf("%d, %d", (int)pow(10, 2), (int)pow(10, 2));
would print
  100, 99

Unrelated:
  win32: document relative include &amp; lib lookup
  win32: normalize_slashes: do not mirror silly gcc behavior
  This reverts part of commit 8a81f9e1036637e21a47e14fb56bf64133546890
  winapi: add missing WINAPI decl. for some functions
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Use runtime function for conversion
- Also initialize fp with tcc -run on windows

This fixes a bug where
  double x = 1.0;
  double y = 1.0000000000000001;
  double z = x &lt; y ? 0 : sqrt (x*x - y*y);
caused a bad sqrt because rounding precision for the x &lt; y comparison
was different to the one used within the sqrt function.

This also fixes a bug where
  printf("%d, %d", (int)pow(10, 2), (int)pow(10, 2));
would print
  100, 99

Unrelated:
  win32: document relative include &amp; lib lookup
  win32: normalize_slashes: do not mirror silly gcc behavior
  This reverts part of commit 8a81f9e1036637e21a47e14fb56bf64133546890
  winapi: add missing WINAPI decl. for some functions
</pre>
</div>
</content>
</entry>
<entry>
<title>win32: wincrt1.c: include stdlib.h for exit()</title>
<updated>2013-02-04T15:24:57+00:00</updated>
<author>
<name>grischka</name>
<email>grischka</email>
</author>
<published>2013-02-04T15:12:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=4c2941d2486f0635aa70de1d429594b1e0b32186'/>
<id>4c2941d2486f0635aa70de1d429594b1e0b32186</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>win32: register SEH in startup code (i386 only)</title>
<updated>2010-10-19T11:15:06+00:00</updated>
<author>
<name>grischka</name>
<email>grischka</email>
</author>
<published>2010-10-19T11:15:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=9228842fa75190665241bf1d3bb3f8f74d2ffdbb'/>
<id>9228842fa75190665241bf1d3bb3f8f74d2ffdbb</id>
<content type='text'>
Needed to handle signal() etc. with msvcrt
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Needed to handle signal() etc. with msvcrt
</pre>
</div>
</content>
</entry>
</feed>
