RE: [Tinycc-devel] I want to port make on Windows using tcc compiler

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

RE: [Tinycc-devel] I want to port make on Windows using tcc compiler

Christian Jullien
Thank you Eli, your help is really appreciated.

From the latest https://ftp.gnu.org/gnu/make/make-4.3.tar.gz I don't see the
src/config.h.W32.template you're referring to.

tar tvzf make-4.3.tar.gz | grep -i templ
-rw-r--r--  0 1000   1000     1015 Jan 03 08:11
make-4.3/tests/scripts/test_template  <= not the one I'm looking for

This distrib however contains src/config.h.W32 which is used "as is" by
build_w32.bat which is the only command I can execute with native tcc.exe
and cmd.exe (no autoconf nor automake in this very reduced env.)

Also the README.W32 tells me: 1. Edit config.h.W32 to your liking
(especially the few shell-related ...

Am I missing something?

FYI, until my two patches exist in standard make distrib, I boostrap
gnumake.exe with Cygwin using:

WINTCC  = https://sourceforge.net/p/wintcc/svn/HEAD/tree
MAKEREPO  = https://ftp.gnu.org/gnu/make
MAKEVER = make-4.3

gnumake.exe:
        @echo Building Windows native version of $@ from sources.
        # apply some patches
        @wget --quiet -O $(MAKEVER).tar.gz $(MAKEREPO)/$(MAKEVER).tar.gz
        @tar xzf $(MAKEVER).tar.gz
        @wget --quiet -O $(MAKEVER)/build_w32.bat
$(WINTCC)/make/build_w32.bat?format=raw
        @chmod a+w $(MAKEVER)/src/config.h.W32
        @wget --quiet -O $(MAKEVER)/src/config.h.W32
$(WINTCC)/make/config.h.W32?format=raw
        # Real build starts here with tcc used as C compiler.
        @(cd $(MAKEVER); cmd /C "set PATH=..;%PATH% && build_w32.bat tcc >
:nul")
        @mv $(MAKEVER)/TccRel/$@ .
        @rm -r -f $(MAKEVER).tar.gz $(MAKEVER)
        @chmod a-x $@
        @dir $@

Because gnumake.exe will be part of tcc standard binary distrib, I must be
able to give users a way to rebuild gnumake.exe from (GPL) source code and
"build_w32.bat tcc" would just do.

-----Original Message-----
From: Eli Zaretskii [mailto:[hidden email]]
Sent: Wednesday, January 22, 2020 18:12
To: [hidden email]
Cc: [hidden email]; [hidden email]
Subject: Re: *** SPAM *** [Tinycc-devel] I want to port make on Windows
using tcc compiler

> From: "Christian Jullien" <[hidden email]>
> Date: Wed, 22 Jan 2020 17:08:32 +0100
>
> The latest files are there:
> <https://sourceforge.net/p/wintcc/svn/HEAD/tree/>
> https://sourceforge.net/p/wintcc/svn/HEAD/tree/
>
> Now, only the modified build_w32.bat and src/config.h.W32 are needed.

config.h.W32 is a generated file, the original is in
src/config.h.W32.template.  And it's better to send patches instead of
the whole files.

Btw, the right place to discuss this is on [hidden email], not here.


Reply | Threaded
Open this post in threaded view
|

Re: [Tinycc-devel] I want to port make on Windows using tcc compiler

Eli Zaretskii
> From: "Christian Jullien" <[hidden email]>
> Date: Wed, 22 Jan 2020 18:44:25 +0100
> Cc: [hidden email]
>
> Thank you Eli, your help is really appreciated.
>
> >From the latest https://ftp.gnu.org/gnu/make/make-4.3.tar.gz I don't see the
> src/config.h.W32.template you're referring to.

The template file is not in the tarball, it is in the GNU Make Git
repository.  See https://savannah.gnu.org/git/?group=make.

Reply | Threaded
Open this post in threaded view
|

Re: [Tinycc-devel] I want to port make on Windows using tcc compiler

Eli Zaretskii
[Please keep the make-w32 list on the CC.]

> From: "Christian Jullien" <[hidden email]>
> Date: Wed, 22 Jan 2020 20:23:33 +0100
>
> I see. In this case I need an advice.
>
> As you probably understand now, I want a simple mechanism which allows a
> non-technical user to rebuild gnumake.exe from an official distrib (like
> 4.3) and tcc.exe + cmd.exe (that's all).
> For example, with Visual C++ installed, build_w32.bat works perfectly and
> produces a fully working gnumake.exe (without the need to get mentioned
> template file).
> I want to do exactly the same replacing default cl by tcc.

OK, but what kind of advice do you need?  The changes to the template
file, if accepted, will eventually be propagated into config.h.W32 in
the release tarball, and so if you can build the tarball by editing
the config.h.W32 file, you will be able to do the same after the patch
for the template is accepted and installed.

> So, here is the patch to apply to template file:
>
> F:\wintcc\make>diff config.h.W32.new config.h.W32.template

Please use "diff -u" or "diff -c".

> Can you please add it as well as my modified build_w32.bat ?

Please also show the diffs for the batch file.

Reply | Threaded
Open this post in threaded view
|

RE: [Tinycc-devel] I want to port make on Windows using tcc compiler

Christian Jullien
Ok here are the patches:

F:\wintcc\make>diff -u config.h.W32.template config.h.W32.new
--- config.h.W32.template       2020-01-22 20:16:49.000000000 +0100
+++ config.h.W32.new    2020-01-22 20:21:05.707350000 +0100
@@ -102,7 +102,7 @@
 /* Define to 1 if you have the <direct.h> header file, and it defines
getcwd()
    and chdir().
    */
-#if (defined(_MSC_VER) || defined(__BORLANDC__)) && !defined(__INTERIX)
+#if (defined(_MSC_VER) || defined(__BORLANDC__) || defined(__TINYC__)) &&
!defined(__INTERIX)
 # define HAVE_DIRECT_H 1
 #endif

@@ -247,7 +247,7 @@
 #define HAVE_STDLIB_H 1

 /* Define to 1 if you have the 'strcasecmp' function. */
-#ifdef __MINGW32__
+#if defined(__MINGW32__) || defined(__TINYC__)
 #define HAVE_STRCASECMP 1
 #endif

@@ -273,7 +273,7 @@
 #define HAVE_STRING_H 1

 /* Define to 1 if you have the 'strncasecmp' function. */
-#ifdef __MINGW32__
+#if defined(__MINGW32__) || defined(__TINYC__)
 #define HAVE_STRNCASECMP 1
 #endif

@@ -305,7 +305,7 @@
 char *ttyname (int);

 /* Define to 1 if you have the `umask' function. */
-#ifdef __MINGW32__
+#if defined(__MINGW32__) || defined(__TINYC__)
 # define HAVE_UMASK 1
 #endif




And





F:\tinycc\win32>diff -u build_w32.bat build_w32.bat.new
--- build_w32.bat 2020-01-22 20:51:47.673891500 +0100
+++ build_w32.bat.new 2020-01-22 16:48:24.087993800 +0100
@@ -37,6 +37,7 @@
 set O=obj
 set ARCH=x64
 set DEBUG=N
+set DIRENT=Y
 
 if exist maintMakefile (
     set MAINT=Y
@@ -49,6 +50,7 @@
 if "%1" == "--without-guile" goto NoGuile
 if "%1" == "--x86" goto Set32Bit
 if "%1" == "gcc" goto SetCC
+if "%1" == "tcc" goto SetTCC
 if "%1" == "" goto DoneSW
 goto Usage
 
@@ -77,10 +79,18 @@
 shift
 goto ParseSW
 
+:SetTCC
+set COMPILER=tcc
+set O=o
+echo - Building with TinyC
+shift
+goto ParseSW
+
 :DoneSW
 if "%MAINT%" == "Y" echo - Enabling maintainer mode
 
 if "%COMPILER%" == "gcc" goto FindGcc
+if "%COMPILER%" == "tcc" goto FindTcc
 
 :: Find a compiler.  Visual Studio requires a lot of effort to locate :-/.
 %COMPILER% >nul 2>&1
@@ -172,6 +182,7 @@
 set OUTDIR=.\GccRel
 set LNKOUT=./GccRel
 set OPTS=-O2
+set DIRENT=N
 if "%DEBUG%" == "Y" set OPTS=-O0
 if "%DEBUG%" == "Y" set OUTDIR=.\GccDebug
 if "%DEBUG%" == "Y" set LNKOUT=./GccDebug
@@ -183,6 +194,21 @@
 echo No %COMPILER% found.
 exit 1
 
+:FindTcc
+set OUTDIR=.\TccRel
+set LNKOUT=./TccRel
+set OPTS=-O2
+if "%DEBUG%" == "Y" set OPTS=-O0
+if "%DEBUG%" == "Y" set OUTDIR=.\TccDebug
+if "%DEBUG%" == "Y" set LNKOUT=./TccDebug
+if "%MAINT%" == "Y" set "OPTS=%OPTS% -DMAKE_MAINTAINER_MODE"
+:: Show the compiler version that we found
+echo.
+%COMPILER% -v
+if not ERRORLEVEL 1 goto Build
+echo No %COMPILER% found.
+exit 1
+
 :Build
 :: Clean the directory if it exists
 if exist %OUTDIR%\nul rmdir /S /Q %OUTDIR%
@@ -272,6 +298,7 @@
 if "%2" == "GUILE" set "EXTRAS=%GUILECFLAGS%"
 if exist "%OUTDIR%\%1.%O%" del "%OUTDIR%\%1.%O%"
 if "%COMPILER%" == "gcc" goto GccCompile
+if "%COMPILER%" == "tcc" goto TccCompile
 
 :: MSVC Compile
 echo on
@@ -284,6 +311,14 @@
 echo on
 %COMPILER% -mthreads -Wall -std=gnu99 -gdwarf-2 -g3 %OPTS% -I%OUTDIR%/src
-I./src -I%OUTDIR%/lib -I./lib -I./src/w32/include -DWINDOWS32
-DHAVE_CONFIG_H %EXTRAS% -o %OUTDIR%/%1.%O% -c %1.c
 @echo off
+goto CompileDone
+
+:TccCompile
+:: TCC Compile
+echo on
+%COMPILER% -mthreads -Wall -std=c11 %OPTS% -I%OUTDIR%/src -I./src
-I%OUTDIR%/lib -I./lib -I./src/w32/include -D_cdecl= -D_MSC_VER -DWINDOWS32
-DHAVE_CONFIG_H %EXTRAS% -o %OUTDIR%/%1.%O% -c %1.c
+@echo off
+goto CompileDone
 
 :CompileDone
 if not exist "%OUTDIR%\%1.%O%" exit 1
@@ -293,6 +328,7 @@
 echo.
 echo Linking %LNKOUT%/%MAKE%.exe
 if "%COMPILER%" == "gcc" goto GccLink
+if "%COMPILER%" == "tcc" goto TccLink
 
 :: MSVC Link
 echo %GUILELIBS% kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
odbc32.lib odbccp32.lib >>%OUTDIR%\link.sc
@@ -309,6 +345,14 @@
 @echo off
 goto :EOF
 
+:TccLink
+:: TCC Link
+echo on
+echo %GUILELIBS% -lkernel32 -luser32 -lgdi32 -lcomdlg32 -ladvapi32
-lshell32 -lole32 -loleaut32 -lodbc32 -lodbccp32 >>%OUTDIR%\link.sc
+%COMPILER% -mthreads %OPTS% -o %LNKOUT%/%MAKE%.exe @%LNKOUT%/link.sc
+@echo off
+goto :EOF
+
 :ConfigSCM
 echo Generating config from SCM templates
 sed -n "s/^AC_INIT(\[GNU make\],\[\([^]]\+\)\].*/s,%%VERSION%%,\1,g/p"
configure.ac > %OUTDIR%\src\config.h.W32.sed
@@ -375,7 +419,7 @@
 goto :EOF
 
 :Usage
-echo Usage: %0 [options] [gcc]
+echo Usage: %0 [options] [gcc|tcc]
 echo Options:
 echo.  --without-guile   Do not compile Guile support even if found
 echo.  --debug           Make a Debug build--default is Release


-----Original Message-----
From: Eli Zaretskii [mailto:[hidden email]]
Sent: Wednesday, January 22, 2020 20:34
To: [hidden email]
Cc: [hidden email]
Subject: Re: [Tinycc-devel] I want to port make on Windows using tcc
compiler

[Please keep the make-w32 list on the CC.]

> From: "Christian Jullien" <[hidden email]>
> Date: Wed, 22 Jan 2020 20:23:33 +0100
>
> I see. In this case I need an advice.
>
> As you probably understand now, I want a simple mechanism which allows a
> non-technical user to rebuild gnumake.exe from an official distrib (like
> 4.3) and tcc.exe + cmd.exe (that's all).
> For example, with Visual C++ installed, build_w32.bat works perfectly and
> produces a fully working gnumake.exe (without the need to get mentioned
> template file).
> I want to do exactly the same replacing default cl by tcc.

OK, but what kind of advice do you need?  The changes to the template
file, if accepted, will eventually be propagated into config.h.W32 in
the release tarball, and so if you can build the tarball by editing
the config.h.W32 file, you will be able to do the same after the patch
for the template is accepted and installed.

> So, here is the patch to apply to template file:
>
> F:\wintcc\make>diff config.h.W32.new config.h.W32.template

Please use "diff -u" or "diff -c".

> Can you please add it as well as my modified build_w32.bat ?

Please also show the diffs for the batch file.


Reply | Threaded
Open this post in threaded view
|

Re: [Tinycc-devel] I want to port make on Windows using tcc compiler

Eli Zaretskii
> From: "Christian Jullien" <[hidden email]>
> Cc: <[hidden email]>
> Date: Wed, 22 Jan 2020 20:57:37 +0100
>
> Ok here are the patches:

Thanks.  A few questions and comments below.

>  :: Find a compiler.  Visual Studio requires a lot of effort to locate :-/.
>  %COMPILER% >nul 2>&1
> @@ -172,6 +182,7 @@
>  set OUTDIR=.\GccRel
>  set LNKOUT=./GccRel
>  set OPTS=-O2
> +set DIRENT=N

What is this part about?  Is it needed, and if so, why?

> +:TccCompile
> +:: TCC Compile
> +echo on
> +%COMPILER% -mthreads -Wall -std=c11 %OPTS% -I%OUTDIR%/src -I./src

Why are you using -std=c11 here? this is unlike all the other
compilations, which use C99.

> +:TccLink
> +:: TCC Link
> +echo on
> +echo %GUILELIBS% -lkernel32 -luser32 -lgdi32 -lcomdlg32 -ladvapi32
> -lshell32 -lole32 -loleaut32 -lodbc32 -lodbccp32 >>%OUTDIR%\link.sc
> +%COMPILER% -mthreads %OPTS% -o %LNKOUT%/%MAKE%.exe @%LNKOUT%/link.sc

Does this build the import library?  And in general, does the tcc
build support loadable modules?

Last, but not least: a contribution this large will need you to sign
legal papers assigning the copyright to the FSF.  Would you like me to
send you the form to fill to start the legal paperwork?

Paul, any comments?  The changes look reasonable to me, FWIW.

Reply | Threaded
Open this post in threaded view
|

RE: [Tinycc-devel] I want to port make on Windows using tcc compiler

Christian Jullien
Ooops, Yes DIRENT is needed. I sent you an incomplete diff. Enclosed are the
right ones. This new build_w32.bat allows both tcc and cl to compile dirent.
You can replace c11 by c99 if you like. I generally use c11 which sometimes
checks about deprecated uses.

Tcc supports loadable libraries (.dll on Windows and .so on linux). If you
never heard about tcc before, I invite you to give a try and see the
phenomenal compiler speed. It makes you think you have an interpreter which
of course dramatically boost your development cycle. It even support
on-the-fly compilation with shee-band #!/usr/local/tcc. This way you can
make shell scripts in C. Compiling a working Linux kernel is a matter of sec
(see https://github.com/seyko2/tccboot)
Execution speed of this one pass compiler is fair: 30 to 50% slower than gcc
or cl. This is my main C compiler I use daily for C devel (no C++). When
code works, I polish the binaries with cl or gcc with all possible optims
for my OpenLisp Lisp compiler. This a must have on RPi for example.
 
> Would you like me to send you the form to fill to start the legal
paperwork?

For sure, I'll be glad to do so.



-----Original Message-----
From: Eli Zaretskii [mailto:[hidden email]]
Sent: Friday, January 24, 2020 08:25
To: [hidden email]; Paul Smith
Cc: [hidden email]
Subject: Re: [Tinycc-devel] I want to port make on Windows using tcc
compiler

> From: "Christian Jullien" <[hidden email]>
> Cc: <[hidden email]>
> Date: Wed, 22 Jan 2020 20:57:37 +0100
>
> Ok here are the patches:

Thanks.  A few questions and comments below.

>  :: Find a compiler.  Visual Studio requires a lot of effort to locate
:-/.
>  %COMPILER% >nul 2>&1
> @@ -172,6 +182,7 @@
>  set OUTDIR=.\GccRel
>  set LNKOUT=./GccRel
>  set OPTS=-O2
> +set DIRENT=N

What is this part about?  Is it needed, and if so, why?

> +:TccCompile
> +:: TCC Compile
> +echo on
> +%COMPILER% -mthreads -Wall -std=c11 %OPTS% -I%OUTDIR%/src -I./src

Why are you using -std=c11 here? this is unlike all the other
compilations, which use C99.

> +:TccLink
> +:: TCC Link
> +echo on
> +echo %GUILELIBS% -lkernel32 -luser32 -lgdi32 -lcomdlg32 -ladvapi32
> -lshell32 -lole32 -loleaut32 -lodbc32 -lodbccp32 >>%OUTDIR%\link.sc
> +%COMPILER% -mthreads %OPTS% -o %LNKOUT%/%MAKE%.exe @%LNKOUT%/link.sc

Does this build the import library?  And in general, does the tcc
build support loadable modules?

Last, but not least: a contribution this large will need you to sign
legal papers assigning the copyright to the FSF.  Would you like me to
send you the form to fill to start the legal paperwork?

Paul, any comments?  The changes look reasonable to me, FWIW.

config.h.W32.patch (1K) Download Attachment
build_w32.bat.patch (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Tinycc-devel] I want to port make on Windows using tcc compiler

Eli Zaretskii
> From: "Christian Jullien" <[hidden email]>
> Cc: <[hidden email]>
> Date: Fri, 24 Jan 2020 09:13:12 +0100
>
> > Would you like me to send you the form to fill to start the legal
> paperwork?
>
> For sure, I'll be glad to do so.

Thanks, form sent off-list.

Reply | Threaded
Open this post in threaded view
|

RE: [Tinycc-devel] I want to port make on Windows using tcc compiler

Christian Jullien
I let you decide if this modest contribution is worth for me to mention as
contributor.

-----Original Message-----
From: Eli Zaretskii [mailto:[hidden email]]
Sent: Friday, January 24, 2020 09:48
To: [hidden email]
Cc: [hidden email]; [hidden email]
Subject: Re: [Tinycc-devel] I want to port make on Windows using tcc
compiler

> From: "Christian Jullien" <[hidden email]>
> Cc: <[hidden email]>
> Date: Fri, 24 Jan 2020 09:13:12 +0100
>
> > Would you like me to send you the form to fill to start the legal
> paperwork?
>
> For sure, I'll be glad to do so.

Thanks, form sent off-list.


Reply | Threaded
Open this post in threaded view
|

Re: [Tinycc-devel] I want to port make on Windows using tcc compiler

Eli Zaretskii
> From: "Christian Jullien" <[hidden email]>
> Cc: <[hidden email]>,
> <[hidden email]>
> Date: Fri, 24 Jan 2020 10:39:12 +0100
>
> I let you decide if this modest contribution is worth for me to mention as
> contributor.

We always attribute the changes to their original authors.  So if your
changes are accepted, your name will be mentioned, of course.

Reply | Threaded
Open this post in threaded view
|

Re: [Tinycc-devel] I want to port make on Windows using tcc compiler

Paul Smith-20
In reply to this post by Eli Zaretskii
On Fri, 2020-01-24 at 09:25 +0200, Eli Zaretskii wrote:
> Paul, any comments?  The changes look reasonable to me, FWIW.

They seem good to me!

Thanks for spearheading this effort Eli.

And thanks for your contribution Christian!


Reply | Threaded
Open this post in threaded view
|

Re: [Tinycc-devel] I want to port make on Windows using tcc compiler

Eli Zaretskii
> From: Paul Smith <[hidden email]>
> Cc: [hidden email]
> Date: Fri, 24 Jan 2020 07:49:37 -0500
>
> On Fri, 2020-01-24 at 09:25 +0200, Eli Zaretskii wrote:
> > Paul, any comments?  The changes look reasonable to me, FWIW.
>
> They seem good to me!

Thanks, then I guess when Christian's legal paperwork is done, I will
apply these changes.

Reply | Threaded
Open this post in threaded view
|

Re: [Tinycc-devel] I want to port make on Windows using tcc compiler

Eli Zaretskii
> Date: Fri, 24 Jan 2020 15:34:08 +0200
> From: Eli Zaretskii <[hidden email]>
> Cc: [hidden email], [hidden email]
>
> Thanks, then I guess when Christian's legal paperwork is done, I will
> apply these changes.

While we are waiting: Christian, did you happen to run the GNU Make
test suite with the tcc-built Make?  The test suite needs some patches
to run reasonably well on MS-Windows, but you can find the patched
tests here:

  https://sourceforge.net/projects/ezwinports/files/make-4.3-w32-src.zip/download

I'd be interested to see the results reported by the test suite for
your build.  For the reference, the MinGW build fares like so:

  49 Tests in 19 Categories Failed

(out of 638 tests).

Thanks.

Reply | Threaded
Open this post in threaded view
|

RE: [Tinycc-devel] I want to port make on Windows using tcc compiler

Christian Jullien
Sure, with pleasure.

Because I've troubles running the suite, if you want to test yourself it
I've put a copy here:

wget http://www.eligis.com/make.exe 

I also tried myself and downloaded your patched archive to give a try.
I'm probably doing something wrong with it.

After extraction and copying make.exe (built with tcc) at the root here is
what I did

c:\downloads\make-4.3>set PATH=c:\downloads\make-4.3;%PATH%
c:\downloads\make-4.3>make --version
GNU Make 4.3
Built for Windows32
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

You will not see it but there are lot of ^M floating in the logs, I'm
forcing them below:
features/archives ....................................... Error running
C:/downloads/make-4.3/make.exe^M (expected 0; got 512):
C:/downloads/make-4.3/make.exe^M -f work/features/archives.mk AR=ar
Error running C:/downloads/make-4.3/make.exe^M (expected 0; got 512):
C:/downloads/make-4.3/make.exe^M -f work/features/archives.mk.1 AR=ar


c:\downloads\make-4.3\tests>run_make_tests.bat
----------------------------------------------------------------------------
--
                     Running tests for GNU make on cygwin
                                GNU Make 4.3
----------------------------------------------------------------------------
--

Clearing work...
Finding tests...

features/archives ....................................... Error running
C:/downl -f work/features/archives.mk AR=ars/make-4.3/make.exe
 -f work/features/archives.mk.1 AR=armake-4.3/make.exe
 -f work/features/archives.mk.1 AR=armake-4.3/make.exe
 -f work/features/archives.mk.2 AR=armake-4.3/make.exe
 -f work/features/archives.mk.2 AR=armake-4.3/make.exe
 -f work/features/archives.mk.3 AR=armake-4.3/make.exe
 -f work/features/archives.mk.4 AR=armake-4.3/make.exe
 -f work/features/archives.mk.5 AR=armake-4.3/make.exe
 -f work/features/archives.mk.6 AR=armake-4.3/make.exe
 -f work/features/archives.mk.6 AR=armake-4.3/make.exe
 -f work/features/archives.mk.7 AR=armake-4.3/make.exe
 -f work/features/archives.mk.7 AR=armake-4.3/make.exe
FAILED (0/12 passed)
features/comments .......................................
*** Test died (features/comments): Command failed: exec: Cannot execute
C:/downl: No such file or directory

-----Original Message-----
From: Eli Zaretskii [mailto:[hidden email]]
Sent: Saturday, January 25, 2020 19:26
To: [hidden email]
Cc: [hidden email]; [hidden email]
Subject: Re: [Tinycc-devel] I want to port make on Windows using tcc
compiler

> Date: Fri, 24 Jan 2020 15:34:08 +0200
> From: Eli Zaretskii <[hidden email]>
> Cc: [hidden email], [hidden email]
>
> Thanks, then I guess when Christian's legal paperwork is done, I will
> apply these changes.

While we are waiting: Christian, did you happen to run the GNU Make
test suite with the tcc-built Make?  The test suite needs some patches
to run reasonably well on MS-Windows, but you can find the patched
tests here:

 
https://sourceforge.net/projects/ezwinports/files/make-4.3-w32-src.zip/downl
oad

I'd be interested to see the results reported by the test suite for
your build.  For the reference, the MinGW build fares like so:

  49 Tests in 19 Categories Failed

(out of 638 tests).

Thanks.


Reply | Threaded
Open this post in threaded view
|

Re: [Tinycc-devel] I want to port make on Windows using tcc compiler

Eli Zaretskii
> From: "Christian Jullien" <[hidden email]>
> Cc: <[hidden email]>,
> <[hidden email]>
> Date: Sun, 26 Jan 2020 07:51:46 +0100
>
> c:\downloads\make-4.3\tests>run_make_tests.bat
> ----------------------------------------------------------------------------
> --
>                      Running tests for GNU make on cygwin
                                                     ^^^^^^
What's this about?  Are you running this with Cygwin tools on PATH?
That's a recipe for disaster, you should run this from cmd.exe, and
you should have native Windows ports of Coreutils and of Perl
installed.  That's how I run the test suite.

Sorry, I should have said that explicitly before luring you into this
adventure.  Working with Cygwin ports will need an entirely different
set of patches to the test suite.

Reply | Threaded
Open this post in threaded view
|

RE: [Tinycc-devel] I want to port make on Windows using tcc compiler

Christian Jullien
I try to keep my dev. Machine a lite as possible so I'll decline to install
more tools (sorry).
If you have time, you can test with the binary I dropped on my site?

-----Original Message-----
From: Eli Zaretskii [mailto:[hidden email]]
Sent: Sunday, January 26, 2020 17:23
To: [hidden email]
Cc: [hidden email]; [hidden email]
Subject: Re: [Tinycc-devel] I want to port make on Windows using tcc
compiler

> From: "Christian Jullien" <[hidden email]>
> Cc: <[hidden email]>,
> <[hidden email]>
> Date: Sun, 26 Jan 2020 07:51:46 +0100
>
> c:\downloads\make-4.3\tests>run_make_tests.bat
>
----------------------------------------------------------------------------
> --
>                      Running tests for GNU make on cygwin
                                                     ^^^^^^
What's this about?  Are you running this with Cygwin tools on PATH?
That's a recipe for disaster, you should run this from cmd.exe, and
you should have native Windows ports of Coreutils and of Perl
installed.  That's how I run the test suite.

Sorry, I should have said that explicitly before luring you into this
adventure.  Working with Cygwin ports will need an entirely different
set of patches to the test suite.


Reply | Threaded
Open this post in threaded view
|

Re: [Tinycc-devel] I want to port make on Windows using tcc compiler

Paul Smith-20
On Sun, 2020-01-26 at 17:57 +0100, Christian Jullien wrote:
> I try to keep my dev. Machine a lite as possible so I'll decline to
> install more tools (sorry).

If you install Perl and Git for Windows you'll have everything you need to
get most of the tests running... in the instances where I have access to a
Windows machine that's all I have installed (as best as I remember).


Reply | Threaded
Open this post in threaded view
|

Re: [Tinycc-devel] I want to port make on Windows using tcc compiler

Eli Zaretskii
> From: Paul Smith <[hidden email]>
> Date: Sun, 26 Jan 2020 12:14:26 -0500
> Cc: [hidden email]
>
> On Sun, 2020-01-26 at 17:57 +0100, Christian Jullien wrote:
> > I try to keep my dev. Machine a lite as possible so I'll decline to
> > install more tools (sorry).
>
> If you install Perl and Git for Windows you'll have everything you need to
> get most of the tests running... in the instances where I have access to a
> Windows machine that's all I have installed (as best as I remember).

But the patches I made in the test suite are not for that
configuration.  (I do have Git for Windows installed, of course, but I
deliberately do not put it on the system-wide PATH.)

Reply | Threaded
Open this post in threaded view
|

Re: [Tinycc-devel] I want to port make on Windows using tcc compiler

Eli Zaretskii
In reply to this post by Christian Jullien
> From: "Christian Jullien" <[hidden email]>
> Cc: <[hidden email]>,
> <[hidden email]>
> Date: Sun, 26 Jan 2020 17:57:25 +0100
>
> I try to keep my dev. Machine a lite as possible so I'll decline to install
> more tools (sorry).

Fair enough.