[patch] Add an option to prevent a native gcc from searching /usr/libexec/gcc and /usr/lib/gcc
Rafael Espindola
espindola@google.com
Wed Aug 5 15:00:00 GMT 2009
Currently a native gcc will unconditionally add /usr/libexec/gcc and
/usr/lib/gcc to exec_prefixes and /usr/lib/gcc to startfile_prefixes.
This is undesirable if one is trying to build an hermetic compiler. It
is possible to avoid this problem by compiling gcc as a "fake" cross
compiler, but then one cannot bootstrap.
The attached patch adds a configure option that is off by default and
if enabled produces a gcc that ignores /usr/libexec/gcc and
/usr/lib/gcc. OK for trunk?
2009-08-05 Rafael Avila de Espindola <espindola@google.com>
* Makefile.in (hermetic_compiler): New.
(DRIVER_DEFINES): Add HERMETIC_COMPILER.
* configure.ac (hermetic-compiler): New.
* gcc.c (hermetic_compiler): New.
(process_command): Don't use standard_exec_prefix_1 and
standard_exec_prefix_2 if hermetic_compiler is set.
Cheers,
--
Rafael Avila de Espindola
Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hermetic.patch
Type: application/octet-stream
Size: 2446 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090805/5ae143b4/attachment.obj>
More information about the Gcc-patches
mailing list