libtool-patches
[Top][All Lists]
Advanced

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

[patch] sort 'find' output to enable deterministic builds.


From: Chris Demetriou
Subject: [patch] sort 'find' output to enable deterministic builds.
Date: Mon, 15 Mar 2010 12:12:31 -0700

A project that I work on wants to make sure our builds are
deterministic, i.e., same input sources -> same exact output binaries.
 We've solved several problems (e.g., I've added the ar 'D' flag)
related to this.  The last remaining issue is in libtool.

libtool uses 'find' to identify lists of objects to include, in
certain cases.  Unfortunately, the output of 'find' can vary (e.g.,
file system type, order in which objects were created, ...), which
introduces non-determinism into my builds.

The attached patch sorts the output of 'find' in all cases (where it's
not already sorted), so as to produce deterministic results.  For my
particular build, I only *need* the second hunk in ltmain.m4sh
(my_oldobjs=...) but I audited all of the libtool sources for other
uses of find that might result in unsorted output and adjusted them as
well.

I can only easily test on an Ubunutu Hardy system.  On that, with this
change applied, 'make check' passes.



thanks,

chris
---
2010-03-15  Chris Demetriou  <address@hidden>

        Sort output of 'find' to enable deterministic builds.
        * libltdl/config/ltmain.m4sh (func_extract_archives): Sort
        output of 'find'.
        * libltdl/m4/libtool.m4 (_LT_LANG_CXX_CONFIG): Likewise.

Attachment: lt_sort.patch
Description: Text Data


reply via email to

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