Hi folks, I found this patch by Joerg Sonnenberger to NetBSD's gcc which adds an "-iremap src:dst" option to gcc (http://www.mail-archive.com/[email protected]/msg08590.html).
The option rewrites the prefix to __FILE__ which is stored in the object file.
My use-case is to make __FILE__ a relative path instead of an absolute one,
e.g. "src/foo/bar.c" instead of "/home/erik/freebsd/gcc_iremap/src/foo/bar.c".
This is one of the requisites to create identical binaries from source code in
different locations on my system.
The option can be used in e.g. make.conf as:
CFLAGS += -iunwrap=${.IMPSRC}:src
Patch against HEAD is attached. Is anyone willing to review this and possibly
commit?
Thanks,
Erik
iremap.diff
Description: Binary data
_______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "[email protected]"
