chicken-hackers
[Top][All Lists]
Advanced

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

[Chicken-hackers] [PATCH] Make the compiler output deterministic


From: Kooda
Subject: [Chicken-hackers] [PATCH] Make the compiler output deterministic
Date: Sat, 21 Oct 2017 17:10:36 +0200

Hi!

It’s been a while since I proposed this change! Here is a set of
patches that does this in a more clean way than the last patch (which
fiddled with the random seed in the compiler, ugh…)

The four patches are independent and address different points of the
code that make the build process unstable. I hope everything is clear,
feel free to ask me if anything isn’t.

These changes will make the life far more easy for NixOS/Guix package
maintainers, and makes it far more easy to see how changes in the
compiler affect its output.

As a bonus, CHICKEN can be used in conjunction with ccache for a
much greater compilation speed! \o/

----

Building CHICKEN twice using ccache, with and without the deterministic build 
patch.
Clean cache for each test.

Without patch
=============

326.60u 8.78s 335.58r    make PLATFORM=linux C_COMPILER=ccache gcc

cache directory                     /tmp/ccache
primary config                      /tmp/ccache/ccache.conf
secondary config      (readonly)    /etc/ccache.conf
cache hit (direct)                     2
cache hit (preprocessed)               4
cache miss                           224
cache hit rate                      2.61 %
called for link                      110
cleanups performed                     0
files in cache                       450
cache size                          41.6 MB
max cache size                       5.0 GB


With patch
==========

63.73u 2.34s 66.10r      make PLATFORM=linux C_COMPILER=ccache gcc

cache directory                     /tmp/ccache
primary config                      /tmp/ccache/ccache.conf
secondary config      (readonly)    /etc/ccache.conf
cache hit (direct)                   114
cache hit (preprocessed)               1
cache miss                           115
cache hit rate                     50.00 %
called for link                      110
cleanups performed                     0
files in cache                       229
cache size                          21.1 MB
max cache size                       5.0 GB

Attachment: 0001-Sort-the-symbol-table-before-outputing-C-code-from-t.patch
Description: Text Data

Attachment: 0002-Remove-the-date-from-the-header-comment-of-generated.patch
Description: Text Data

Attachment: 0003-Make-the-building-of-.a-files-deterministic.patch
Description: Text Data

Attachment: 0004-Remove-the-build-tag-completely.patch
Description: Text Data


reply via email to

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