This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING^4][PATCH v2] Generate reproducible output independently of the build-path

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]