Ximin Luo: > Joseph Myers: >> On Wed, 2 Nov 2016, Ximin Luo wrote: >> >>> This patch series adds a new environment variable SOURCE_PREFIX_MAP. When >>> this >>> is set, GCC will treat this as an implicit "-fdebug-prefix-map=$value" >>> command-line argument. This makes the final binary output reproducible, and >> >> Only one argument? Sometimes you may want multiple -fdebug-prefix-map >> options (for both source and build directories, for example). Perhaps the >> value should be split on spaces to provide multiple such mappings? >> > > We wanted to keep this environment variable simple, and allowing this would > make it more costly for other projects to adopt. > > Whichever separator character we choose, we would have to either (a) disallow > it within the oldprefix/newprefix strings like what PATH does or (b) think of > an escaping scheme. Neither choice is great - with (a) since we want to map > *arbitrary* paths the restriction is less acceptable here than in PATH, and > with (b) it adds complexity to the spec, for uncommon use-cases. >
If we picked '\n' as the separator character, we could perhaps live with the (a) restriction. I'll wait a while for others to comment some more. > In the case of an out-of-tree build, it is still possible with the current > proposal. Instead of: > > SOURCE_PREFIX_MAP="srcprefix=srcname:buildprefix=buildname" > > One could arrange the tree like: > > commonprefix/srcname > commonprefix/buildname > > then set SOURCE_PREFIX_MAP="commonprefix=." or > SOURCE_PREFIX_MAP="commonprefix/=". > -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git