From patchwork Thu Jan 27 13:39:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Baldwin X-Patchwork-Id: 80693 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 51596B7113 for ; Fri, 28 Jan 2011 00:40:03 +1100 (EST) Received: (qmail 20700 invoked by alias); 27 Jan 2011 13:40:01 -0000 Received: (qmail 20681 invoked by uid 22791); 27 Jan 2011 13:40:00 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Jan 2011 13:39:55 +0000 Received: from kpbe14.cbf.corp.google.com (kpbe14.cbf.corp.google.com [172.25.105.78]) by smtp-out.google.com with ESMTP id p0RDdr3H022583 for ; Thu, 27 Jan 2011 05:39:53 -0800 Received: from hpgntab-ubiq73.eem.corp.google.com (hpgntab-ubiq73.eem.corp.google.com [172.25.130.115]) by kpbe14.cbf.corp.google.com with ESMTP id p0RDdqxm010147 for ; Thu, 27 Jan 2011 05:39:52 -0800 Received: by hpgntab-ubiq73.eem.corp.google.com (Postfix, from userid 9603) id CCBD41C6CDA; Thu, 27 Jan 2011 14:39:51 +0100 (CET) To: gcc-patches@gcc.gnu.org Subject: [google] Sort output of find for libtool to ensure deterministic archives Message-Id: <20110127133951.CCBD41C6CDA@hpgntab-ubiq73.eem.corp.google.com> Date: Thu, 27 Jan 2011 14:39:51 +0100 (CET) From: simonb@google.com (Simon Baldwin) X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Sort output of 'find' for libtool to ensure deterministic archives. Strict build environments do binary comparisons of files across gcc builds. Parallelized builds, followed by locating object files with a find command, result in non-deterministic ordering of object files found. The ordering of files found can then affect archive construction, causing such strict build environments to report differences that are false positives. Sorting objects returned by the find command removes these false positives. Targeted for the google/integration branch. ChangeLog.google: 2011-01-27 Simon Baldwin * ltmain.sh (func_extract_archives): Sort the output of 'find'. Google ref: 39145, 39106 Index: ltmain.sh =================================================================== --- ltmain.sh (revision 169330) +++ ltmain.sh (working copy) @@ -2932,7 +2932,7 @@ func_extract_archives () func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs"