From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) by sourceware.org (Postfix) with ESMTPS id 5C9633857022 for ; Fri, 2 Apr 2021 03:55:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5C9633857022 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=superbaloo.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=baloo@superbaloo.net Received: by mail-qt1-f181.google.com with SMTP id c6so3079515qtc.1 for ; Thu, 01 Apr 2021 20:55:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=yxOWkq/M0SiUtgPVSz4s4NQLva5qnx5e56R5/xLmYn8=; b=Ws9FrZEKJEiXPBe/O9XhyuvJQ5KJhbY31QsuwgvCFf7MNL19I5SEl7v1tu2uVVEGGd eFxutZowW729psnUQGoDR0FPlrqF70McqbifZqasAMVCetuwk2cSLI7F3ST6rIG/Xu8C GFiS7FoSVs1Ym3whdY5igpx+NKmipbfsnBvcqXOK5d7XTEMNs0k7ClTJayFQeqtCftqQ 3ReO1JtGaJzdso/eiLkYJWFGsHi/aYtcc1tqeQsbClVItVrYmS/K28+wZRcHCObUe7G7 DBkwrGga1PJ/ZNNftQtZKAdLGve/rCllR1J6aSU5LLC1ivsVDnPcOjzg6xSAPEhlFNtf lNtg== X-Gm-Message-State: AOAM532oyHhqXQmc0P/o5I8wZY6FCu5DB6e7SLrzxl7/3X+aY9V+BcBa yb650cJjmTMa36t94gyLYCYy2Pqbun1mijZMuBn9yEzqf1Cu4x9J X-Google-Smtp-Source: ABdhPJwL9Vhkg8pzU8gTcBksWNzQUP0rVzviDonM2Eb8BSMhBSbGq4Cq1Qq2nCtT4IwTIvPuFXWtFQf2GZjVb+bKrrQ= X-Received: by 2002:ac8:47cf:: with SMTP id d15mr9879562qtr.357.1617335751757; Thu, 01 Apr 2021 20:55:51 -0700 (PDT) MIME-Version: 1.0 From: Arthur Gautier Date: Fri, 2 Apr 2021 03:55:41 +0000 Message-ID: Subject: Build reproducibility of gcc @ NixOS To: gcc@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TO_NO_BRKTS_PCNT, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2021 03:55:53 -0000 Dear GCC development team, We've been trying to build reproducibly the minimal NixOS image, and gcc was one of the last issues we had. We found that disabling profiled bootstrap compilation of GCC allowed us to get a reproducible build of gcc. Our efforts can be followed here: https://github.com/NixOS/nixpkgs/pull/112928 But I measured disabling this optimization to cost around 7-12% depending on the build. Because of this performance regression, we're trying to find a middle ground. Ideally we'd like to keep the performance of gcc as untouched as possible (even if that costs us on compilation time of gcc itself). Compiling gcc twice on the same machine gets us the same output, but compiling on a different architecture gets us a different result. Reading the documentation, it would seem that autoprofiledback bootstrap would use machine metrics and injects them in the build (and we don't use autoprofiledback), But I would not expect the stagetrain of profiledbootstrap to do that. I tried disabling concurrency of the stagetrain without luck. It feels like I'm missing something. Would anyone have any idea what could inject the host's behavior here? Thank you for your help! Best, -- Arthur