tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Add wine support


From: Pursuer
Subject: Re: [Tinycc-devel] Add wine support
Date: Fri, 25 Oct 2019 20:46:13 +0800

I build TCC on Windows with MSYS and MinGW32-W64.
Open the shell of msys.

cd tinycc
./configure
make

And It will report a error about texi file. It's doesn??t matter, The tcc.exe and libtcc.dll have been generated.Then you can

make test

to run the test.
You can try this way on wine.


Should we use git reset --hard and push -f to mob to discard the latest commiting?


------------------ Original ------------------
From: "tinycc-devel"<address@hidden>;
Date: Fri, Oct 25, 2019 01:38 PM
To: "jullien"<address@hidden>;"tinycc-devel"<address@hidden>;
Cc: "Herman ten Brugge"<address@hidden>;
Subject: Re: [Tinycc-devel] Add wine support

Ok. I will remove it. I find it a bit silly because with this Makefile
you can now do ALL code development under linux and do not need windows.

With patch below you can now also run all window tests on linux.

     Herman



--- a/Makefile  2019-10-24 22:10:39.126565846 +0200
+++ b/Makefile  2019-10-25 07:32:36.811116683 +0200
@@ -41,6 +41,7 @@ pre:
         @echo TARGETOS=Windows  1>> ../config.mak
         @echo CONFIG_WIN32=yes 1>> ../config.mak
         @echo TOPSRC=$$\(TOP\) 1>> ../config.mak
+       @echo EXESUF=.exe 1>> ../config.mak
         @echo "#define TCC_VERSION \"$(VERSION)\"" 1>../config.h
         @echo "#ifdef TCC_TARGET_X86_64" 1>>../config.h
         @echo "#define TCC_LIBTCC1 \"libtcc1-64.a\"" 1>>../config.h
@@ -73,7 +74,7 @@ bootstrap:

  PHONY += bootstrap

-TCC = wine ./tcc.exe
+TCC = WINEDEBUG=fixme-all wine ./tcc.exe

  lib/libtcc1-32.a:
         @echo Building $*.a with tcc -m32
@@ -111,7 +112,7 @@ PHONY += libs

  rebuild:
         @echo Rebuild using tcc itself - default $(TARGET)bits
-       @wine ./$(TARCH)-win32-tcc.exe -O2 -B. $(TFLAGS) -DTCC_TARGET_PE
-o tcc.exe ../tcc.c
+       @WINEDEBUG=fixme-all wine ./$(TARCH)-win32-tcc.exe -O2 -B.
$(TFLAGS) -DTCC_TARGET_PE -o tcc.exe ../tcc.c
         @$(TCC) -O2 -B. $(TFLAGS) -DTCC_TARGET_PE -DLIBTCC_AS_DLL -o
libtcc.dll -shared ../libtcc.c
         @$(TCC) -O2 -B. -m32 -DTCC_TARGET_PE -DTCC_TARGET_I386 -o
tmp-tcc.exe ../tcc.c && mv tmp-tcc.exe i386-win32-tcc.exe
         @$(TCC) -O2 -B. -m$(TARGET) -DTCC_TARGET_PE -DTCC_TARGET_X86_64
-o tmp-tcc.exe ../tcc.c && mv tmp-tcc.exe x86_64-win32-tcc.exe
@@ -119,11 +120,11 @@ rebuild:
  PHONY += rebuild

  test:
-       @(cd ../tests; $(MAKE) -k TCC=$(PWD)/tcc hello-exe hello-run)
-       @(cd ../tests; $(MAKE) -k TCC=$(PWD)/tcc vla_test-run tests2-dir
pp-dir)
+       @(cd ../tests; WINEDEBUG=fixme-all $(MAKE) -k TCC="wine
$(PWD)/tcc.exe" hello-run)
+       @(cd ../tests; WINEDEBUG=fixme-all $(MAKE) -k TCC="wine
$(PWD)/tcc.exe" vla_test-run tests2-dir pp-dir)
  ifeq ($(CPU), 64)
-       @(cd ../tests; $(MAKE) -k TCC=$(PWD)/i386-win32-tcc hello-exe
hello-run)
-       @(cd ../tests; $(MAKE) -k TCC=$(PWD)/i386-win32-tcc vla_test-run
tests2-dir pp-dir)
+       @(cd ../tests; WINEDEBUG=fixme-all $(MAKE) -k TCC="wine
$(PWD)/i386-win32-tcc.exe" hello-run)
+       @(cd ../tests; WINEDEBUG=fixme-all $(MAKE) -k TCC="wine
$(PWD)/i386-win32-tcc.exe" vla_test-run tests2-dir pp-dir)
  endif

  PHONY += test


On 2019-10-25 07:27, Christian Jullien wrote:
> Hello Herman,
>
> Before I made wintcc project, I dropped my Makefile in tinycc official win32 project as I think it is useful.
> For yet an unclear reason, Grischka asked me to remove it as there is others, yet much more complex, ways to build native tcc. (see https://lists.nongnu.org/archive/html/tinycc-devel/2017-07/msg00053.html)
>
> I copied your Makefile in https://sourceforge.net/projects/wintcc/ to share your contribution. Unless Grischka changes its mind about Windows support, can you please remove wine from tinycc.
>
> On my side, I'll try to see if I can have a single Makefile for Cygwin and wine. Currently, it resides in wine/Makefile
>
> Christian.
>
> P.S. I share your frustration
>
> -----Original Message-----
> From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=address@hidden] On Behalf Of Herman ten Brugge via Tinycc-devel
> Sent: Thursday, October 24, 2019 22:14
> To: Herman ten Brugge via Tinycc-devel
> Cc: Herman ten Brugge
> Subject: [Tinycc-devel] Add wine support
>
> I wanted to test how windows generated some code. I never use windows so
> I wanted to use wine.
>
> I copied the Makefile from 'https://sourceforge.net/projects/wintcc/'
> and adjusted it a little bit.
>
> Now I can use the windows version on linux with wine.
>
>
>
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>


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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]