tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Push reproducible builds script? (for windows)


From: Christian Jullien
Subject: Re: [Tinycc-devel] Push reproducible builds script? (for windows)
Date: Fri, 29 Sep 2017 06:36:12 +0200

Grischka,

 

Win32/Makefile does many things more:

 

I builds by default Windows native tcc x86 and x64 binaries as well as tcc drivers that selects target based on -m32/-m64 flag.

It also allows to run tests with both modes.

 

Since ./configure on CYGWIN gives:

 

/cygdrive/f/tinycc$ ./configure

Binary  directory   C:/Program Files/tcc

TinyCC directory    C:/Program Files/tcc

Library directory   C:/Program Files/tcc/lib

Include directory   C:/Program Files/tcc/include

Manual directory    C:/Program Files/tcc/man

Info directory      C:/Program Files/tcc/info

Doc directory       C:/Program Files/tcc/doc

Source path         .

C compiler          gcc (6.4)

Target OS           CYGWIN_NT-10.0

CPU                 x86_64

Config              WIN32

Creating config.mak and config.h

config.h is unchanged

 

I can try to detect CYGWIN_NT* from main Makefile and recursively call

                $(MAKE) –C win32

 

Ditto for test:

$(MAKE) –C win32 test

 

 

That way, the specificities of Windows remain in win32

 

 

-----Original Message-----
From: grischka [mailto:address@hidden
Sent: jeudi 28 septembre 2017 09:14
To: avih
Cc: address@hidden; Christian JULLIEN
Subject: Re: [Tinycc-devel] Push reproducible builds script? (for windows)

 

avih wrote:

>

>     > On Wednesday, September 27, 2017 9:30 AM, grischka <address@hidden> wrote:

>

>  > May I suggest something:  Why don't you guys combine your knowledge>  and personal preferences and apply it to our standard Makefile instead> of adding each your own scripts?

> I don't disagree that it would be nice to have one place which maintains the work of "create the win32 distributions (32/64)", and preferably it can run on any system/OS, and be reproducible.

>

> I was attempting to improve the standard makefile some time ago with

> roughly that in mind, and specifically the cross builds. You can see

> my list of commits (haven't pushed new ones for over a year) here:

> https://github.com/avih/tinycc/commits/drafts

>

> However, as hard as I tried, I could not keep my patches up to date with your (grishka) ever changing-everything commits once in a while, especially those at Makefile and configure.

> And since I didn't consider my patches production ready to push, and I couldn't maintain and rebase them, I dropped this work, and concentrated my efforts on my reproducible build script.

>

> I suspect (though for sure cannot know) that win32/Makefile is not integrated to the main Makefile for similar reasons. After all, why would one need win32/Makefile if the main one would "just work" for this need?

 

Well however the fact that someone at some point in time didn't manage to make something work with what we already have doesn't count as an argument that we add everybody's convenience scripts to support their personal workarounds.

 

What could count is whether it maybe implements a new principle that has enough advantages worth to maintain a new file.

 

And there I don't see advantages that are interesting enough for a wider audience.  There are some nifty features and there may be some audience but to my estimation it's rather unlikely large enough to keep the script up to date in future.

 

For same reason I also consider to remove the "cygwin" Makefile.

The instructions how to use it say "Install Base, gcc, make".  Okay, but this is not nothing, and then why not tell users to get the right compiler in the first place:  "Install Base, mingw-gcc, make"  and then to use normal configure & make.

 

Christian, do you think you could launch the setup program of your cygwin eventually and mark the mingw32 cross compiler as "to be installed"

and then see what you can do with it and our normal configure && meke?

 

The cross-gcc will be something like i686-w64-mingw32-gcc, therefor you will probably need

       ./configure --cross-prefix=i686-w64-mingw32-

       make

       make test

 

The prefix may vary with cygwin versions.

 

--- grischka

 

 

> I did manage to push to mob or promote some changes, such as supporting out of tree builds, for which I'm grateful.

>

>> As I see it, both, Christian's win32/Makefile (labeled "for cygwin")

>> as well as Avi's suggested reproducible builds script really are very

>> similar:

> Indeed they are. They use the same approach and with the same goal. The main differences I could identify off hand would be:

> - win32/Makefile requires [g]make. my script needs only a shell and a compiler.

> - win32/Makefile runs only on cygwin (and confirmed msys2 too), but not on *nix systems (tested ubuntu), mine runs everywhere I tested - which is a lot.- My script calculates and prints a signature to confirm reproducibility.- My script makes an explicit effort to not require features which are not available everywhere, such as realpath, symlinks, and few more, and instead implements good enough variants as posix shell functions.

> - My script only puts new files at the output dir and doesn't leave traces at the main dir[s]. It also creates a temp work dir inside the output dir and deletes it once done. As you can tell, I'm a big fan of out-of-tree builds...

> My goal was to allow building the same binary everywhere (even osx or bsd) and with the same tool (a single script), with the minimal supported setup being busybox on windows and tcc itself as a bootstrap CC .

> Therefore I find most of the diffs meaningful.

> If you agree with this goal, then I cannot see this happen with the main configure and Makefile. I did also try to use a win32 make.exe within busybox and do the normal procedure. I made some progress, but there are a lot of roadblocks and a lot of missing features, and eventually I dropped it and took the script approach.

> I also think it won't be fair to limit the tools which the main configure && make use just to allow building with a minimal setup.

>

>

>

>> What do you guys think?

> I'm willing to help with such effort, but It will only be usable with a full blown development environment, which not everyone has.

> I think the reproducible shell script would still have value on such case, for the little people :), and for its simplicity and relatively bullet proof implementation (famous last words ;) ).

>

>

>   


reply via email to

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