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: Herman ten Brugge
Subject: Re: [Tinycc-devel] Add wine support
Date: Fri, 25 Oct 2019 07:38:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

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





reply via email to

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