From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25195 invoked by alias); 2 Feb 2018 13:22:25 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 25181 invoked by uid 89); 2 Feb 2018 13:22:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-9.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy= X-HELO: mta04.svc.cra.dublin.eircom.net Received: from mta04.svc.cra.dublin.eircom.net (HELO mta04.svc.cra.dublin.eircom.net) (159.134.118.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with SMTP; Fri, 02 Feb 2018 13:22:21 +0000 Received: (qmail 7168 messnum 21627619 invoked from network[213.94.190.11/avas00.vendorsvc.cra.dublin.eircom.net]); 2 Feb 2018 13:22:19 -0000 Received: from avas00.vendorsvc.cra.dublin.eircom.net (HELO avas00) (213.94.190.11) by mta04.svc.cra.dublin.eircom.net (qp 7168) with SMTP; 2 Feb 2018 13:22:19 -0000 Received: from mail.sceal.ie ([83.70.207.66]) by Cloudmark Gateway with SMTP id hbIJeQmZ1whbBhbIJeyIYH; Fri, 02 Feb 2018 13:22:19 +0000 X-CNFS-Analysis: v=2.2 cv=HIOzLslv c=1 sm=1 tr=0 a=0Iw1gYdl+gX5BU/pizvEUA==:117 a=0Iw1gYdl+gX5BU/pizvEUA==:17 a=Op4juWPpsa0A:10 a=13zjGPudsaEWiJwPRgMA:9 a=SsMK-6ewAAAA:8 a=xNf9USuDAAAA:8 a=Ug2Xn3OAAAAA:8 a=0ay-uKBNRVq-OtbdMrIA:9 a=QEXdDO2ut3YA:10 a=DO8rG6J6TjT6lXwMhPcA:9 a=ONNS8QRKHyMA:10 a=49hUO6naoDravHwzbBTq:22 a=SEwjQc04WA-l_NiBhQ7s:22 a=jup2QEcnA-U7-sUVP0FS:22 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.sceal.ie (Postfix) with ESMTP id 83BCC16A8A7 for ; Fri, 2 Feb 2018 13:22:19 +0000 (GMT) Received: from mail.sceal.ie ([127.0.0.1]) by localhost (mail.sceal.ie [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yocseZQp0F7C for ; Fri, 2 Feb 2018 13:22:18 +0000 (GMT) Received: from AlastairsLaptop.ichec.ie (arcturus.ichec.ie [193.1.243.3]) by mail.sceal.ie (Postfix) with ESMTPSA id 6F71516A89E for ; Fri, 2 Feb 2018 13:22:18 +0000 (GMT) To: fortran@gcc.gnu.org From: Alastair McKinstry Subject: Bit-reproduciblity issue for gfortran .mod files Openpgp: preference=signencrypt Message-ID: <4bf5bd17-616d-06ad-f6b6-e8a253c60ed7@debian.org> Date: Fri, 02 Feb 2018 13:22:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:58.0) Gecko/20100101 Thunderbird/58.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MbAHvhAYlqnbFWAlZIZi0HAd2OfKWbbDi" X-CMAE-Envelope: MS4wfJTwtDEjhYDGvPGbYf7U/wCFAj3nC5QBK/9V3BQhG05+TrzRt6JzpGMexS0x/bQoG7DRdfnqpESDgdhWK4NX3RG9ZjvAMMoEc5ZmQNUdiIJTQfD6lXJR 3oG0oACWusN85UkDExCU5TGTocOTHdeNPcFNPshDxyOP/0zC7i0fCo4W X-SW-Source: 2018-02/txt/msg00006.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --MbAHvhAYlqnbFWAlZIZi0HAd2OfKWbbDi Content-Type: multipart/mixed; boundary="e0b1BIbMELPrHqA2wAHdn50C2neeLRTNo"; protected-headers="v1" From: Alastair McKinstry To: fortran@gcc.gnu.org Message-ID: <4bf5bd17-616d-06ad-f6b6-e8a253c60ed7@debian.org> Subject: Bit-reproduciblity issue for gfortran .mod files --e0b1BIbMELPrHqA2wAHdn50C2neeLRTNo Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US Content-length: 1776 Hi, gfortran .mod files compressed files, contains a header, which looks like: (viewed with e.g. zmore /usr/include/cgns.mod ): GFORTRAN module version '14' created from /build/libcgns-XmhIxt/libcgns-3.3= .0/src/cgns_f.F90 (() () () () () () () () () () () () () () () () () () () () () () () () () () ()) The full path of the compiled fortran file is included, which can break b=3D it-reproducible builds. (see https://reproducible-builds.org/) A trivial patch is included, to strip the path. Best regards Alastair McKinstry Index: gcc-7-7.2.0/src/gcc/fortran/module.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- gcc-7-7.2.0.orig/src/gcc/fortran/module.c +++ gcc-7-7.2.0/src/gcc/fortran/module.c @@ -79,6 +79,10 @@ along with GCC; see the file COPYING3. #include "scanner.h" #include =20 +/* for GNU / POSIX basename */ +#define _GNU_SOURCE +#include + #define MODULE_EXTENSION ".mod" #define SUBMODULE_EXTENSION ".smod" =20 @@ -6063,8 +6067,9 @@ dump_module (const char *name, int dump_ gfc_fatal_error ("Can't open module file %qs for writing at %C: %s", filename_tmp, xstrerror (errno)); =20 + /* Use basename to make builds bit-reproducible */ gzprintf (module_fp, "GFORTRAN module version '%s' created from %s\n", - MOD_VERSION, gfc_source_file); + MOD_VERSION, basename(gfc_source_file)); =20 /* Write the module itself. */ iomode =3D IO_OUTPUT; --=20 Alastair McKinstry, , , https://di= aspora.sceal.ie/u/amckinstry Misentropy: doubting that the Universe is becoming more disordered.=20 --e0b1BIbMELPrHqA2wAHdn50C2neeLRTNo-- --MbAHvhAYlqnbFWAlZIZi0HAd2OfKWbbDi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJadGYKAAoJEMvmu05dmtOl5MEP/2U/R8L4TvORNLvXt3/a7vOx N5zJF+FcNnrVe9piJMIqFbtVPnB4cEqdQn1/8JDhroDUYYKWIIe62VQ3X/RuCQZS tT+4R8eSlfswxB8sS0/lM6ie+k+hDp8+QkedFI1MoB1hpqsasVAJ3Q79lLX+SJNv 2RD/Hr5WFooEAd+HWfH2wxRekEnKwUjg/jtcri7JcyW5ifJ8tCAEIYbQW7yXfTIr e9ujvnc4BhxVZIKWrfu+li/EjEXzrLvXZluuPNA1IKXHGVdbbj0T/YE6l5xwe5Iy sn6lFcFGL/WNdj1vL059GlTdlrtuQb8+HrX+LeF6RCqMI01I7bnOtIQo5ez8/3lK 2WZ6ezhp7QnG/+n7+bI+olZKd9Cc5TxGGipLoXm5dto4+9IOuxlFK70RL4HjTS7o 92ag/YQUYOpipLczXIBraxeGvopJYAcMlLjMPFld8EhxDO4TRtBYU/id9uZl6Lld MOnuqxKKd6q6df/uJdHdvirMDtUSC8kc9BylXffmtTp/MSJQOQYYg1hTxexOnzqy r2NDpXdI1Hm6FI5CeEcGAuERi1wI8p37ir9hv6/AN/Ba2awI43dEZY7HNDvCROl6 ozsPVEgmFU5PZuEO0RAMtPbNuSwspqrpwxheJ/P0enlF7w+3bXC/0T6qmB/bf06b z2+cbUwW6HkNvR93QsUi =HeAZ -----END PGP SIGNATURE----- --MbAHvhAYlqnbFWAlZIZi0HAd2OfKWbbDi--