From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32156 invoked by alias); 10 Aug 2017 22:09:08 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 32145 invoked by uid 89); 10 Aug 2017 22:09:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=H*Ad:D*debian.org, Hx-languages-length:1293, policy X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 10 Aug 2017 22:09:06 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1dfvdX-0002TB-OI from joseph_myers@mentor.com ; Thu, 10 Aug 2017 15:09:03 -0700 Received: from digraph.polyomino.org.uk (137.202.0.87) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 10 Aug 2017 23:09:00 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.86_2) (envelope-from ) id 1dfvdR-0003aX-4A; Thu, 10 Aug 2017 22:08:57 +0000 Date: Fri, 11 Aug 2017 02:53:00 -0000 From: Joseph Myers To: Ximin Luo CC: Yury Gribov , Matthias Klose , Jeff Law , GCC Patches Subject: Re: [PING^4][PATCH v2] Generate reproducible output independently of the build-path In-Reply-To: <26de3a96-a923-93e4-ff1a-fbfa4844724d@pwned.gg> Message-ID: References: <20170721161538.7508-1-infinity0@pwned.gg> <3136125b-bd88-7c0b-504e-a4e4de545bbb@redhat.com> <4b6c844f-9a46-4a4b-48c5-9dfeac54b97f@pwned.gg> <7e11eaf0-99fe-e1b3-3396-df7642a56cdc@debian.org> <26de3a96-a923-93e4-ff1a-fbfa4844724d@pwned.gg> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2017-08/txt/msg00773.txt.bz2 On Thu, 10 Aug 2017, Ximin Luo wrote: > Normally, system-wide CFLAGS etc are a static expression of policy. What I mean > by that is, writing logic to determine CFLAGS for particular package, would > "look like" the actual wording of that policy. So for example, "all packages > should have debug" => "CFLAGS+=-g", "packages that match property X should have > flag Y" => "if X then CFLAGS += Y". OTOH if your policy is "packages should be > reproducible" and we have to add these prefix-remapping flags to CFLAGS, you're > adding a dependency from the value of CFLAGS itself, onto the build-time > filesystem. So CFLAGS is no longer a static expression of policy, it depends on > information not part of the policy. > > So, prefix-map is really different from other CFLAGS, it adds extra dependency > relationships that other flags don't add. I think the difference is essentially that these options belong in CC not CFLAGS (CFLAGS is for non-semantic options, CC should include any options that are required in every compilation). (FWIW, I support having the environment variable, but think there should be some command-line option exactly equivalent to it.) -- Joseph S. Myers joseph@codesourcery.com