[Bug fortran/54725] cross gfortran always searches host paths (e.g. /usr/include)

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Sep 28 14:30:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54725

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-09-28 14:30:09 UTC ---
I forgot half of the patch - the second half is needed when no system root
exists. The patch is still untested.

--- a/gcc/fortran/cpp.c
+++ b/gcc/fortran/cpp.c
@@ -40,2 +40,6 @@ along with GCC; see the file COPYING3.  If not see

+#ifndef TARGET_SYSTEM_ROOT
+# define TARGET_SYSTEM_ROOT NULL
+#endif
+
 #ifndef TARGET_CPU_CPP_BUILTINS
@@ -269,3 +273,3 @@ gfc_cpp_init_options (unsigned int decoded_options_count,
   gfc_cpp_option.prefix = NULL;
-  gfc_cpp_option.sysroot = NULL;
+  gfc_cpp_option.sysroot = TARGET_SYSTEM_ROOT;



More information about the Gcc-bugs mailing list