Created attachment 22841 [details] Implement cpp -iremap __FILE__ expands to full path names in some situation, e.g. if it is used in a header found via -I/some/where. The resulting leak of the header location into the file binary is undesirable in certain situations. For NetBSD, two relevant cases are the visiblity protection in pkgsrc, which effectively turns /usr/pkg/include/foo into /.../work/.buildlink/include/foo and cross-compiling the system, which would leak /.../usr/include/foo instead of /usr/include/foo or the location of the source tree. The attached patch implements a CPP option to match the file path against a list of prefixes and substitute the prefix on match. With this patch, most references to the src and obj locations in NetBSD can be translated into the canonical positions. The patch is the version included in NetBSD against the system gcc, it can be updated if necessary.
On Thu, 23 Dec 2010, joerg at netbsd dot org wrote: > The patch is the version included in NetBSD against the system gcc, it can be > updated if necessary. Who are the authors of this patch? It's large enough that it can't be considered without a copyright assignment on file with the FSF (and given such an assignment a version against trunk would then need to be submitted).
On Thu, Dec 23, 2010 at 12:16:40PM +0000, joseph at codesourcery dot com wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047 > > --- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2010-12-23 12:16:37 UTC --- > On Thu, 23 Dec 2010, joerg at netbsd dot org wrote: > > > The patch is the version included in NetBSD against the system gcc, it can be > > updated if necessary. > > Who are the authors of this patch? It's large enough that it can't be > considered without a copyright assignment on file with the FSF (and given > such an assignment a version against trunk would then need to be > submitted). I am the author of the text. Where can I find the papers for the FSF? Joerg
On Thu, 23 Dec 2010, joerg at britannica dot bec.de wrote: > > On Thu, 23 Dec 2010, joerg at netbsd dot org wrote: > > > > > The patch is the version included in NetBSD against the system gcc, it can be > > > updated if necessary. > > > > Who are the authors of this patch? It's large enough that it can't be > > considered without a copyright assignment on file with the FSF (and given > > such an assignment a version against trunk would then need to be > > submitted). > > I am the author of the text. Where can I find the papers for the FSF? Please fill in the form at http://gcc.gnu.org/wiki/CopyrightAssignment and send it to fsf-records@gnu.org and they will then send you the appropriate assignment form.
(In reply to comment #3) > Please fill in the form at > http://gcc.gnu.org/wiki/CopyrightAssignment > and send it to fsf-records@gnu.org and they will then send you the > appropriate assignment form. Done and processed.
What's the status of this patch?
Nothing has changed. It likely needs updates to apply to GCC 4.8+, but the general functionality is still desirable, IMO.
I believe this is a duplicate of #70268 that has been fixed. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268
Yes this is a dup. *** This bug has been marked as a duplicate of bug 70268 ***