re PR fortran/54725 (cross gfortran always searches host paths (e.g. /usr/include))

gcc/
2012-10-21  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54725
        * Makefile.in (TARGET_SYSTEM_ROOT_DEFINE): New.

gcc/fortran
2012-10-21  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54725
        * Make-lang.in (CFLAGS-cpp.o): Use TARGET_SYSTEM_ROOT_DEFINE.
        * cpp.o (gfc_cpp_init_options): Use it for
        setting gfc_cpp_option.sysroot.

From-SVN: r192650
This commit is contained in:
Tobias Burnus 2012-10-21 12:51:26 +02:00 committed by Tobias Burnus
parent 72ac1c070c
commit ce86ad58a4
5 changed files with 19 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2012-10-21 Tobias Burnus <burnus@net-b.de>
PR fortran/54725
* Makefile.in (TARGET_SYSTEM_ROOT_DEFINE): New.
2012-10-21 Chung-Lin Tang <cltang@codesourcery.com>
* config/xtensa/xtensa.c (xtensa_expand_builtin): Remove unused 'arg'

View file

@ -468,6 +468,7 @@ LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
# Directory for prefix to system directories, for
# each of $(system_prefix)/usr/include, $(system_prefix)/usr/lib, etc.
TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
xmake_file=@xmake_file@
tmake_file=@tmake_file@

View file

@ -1,3 +1,10 @@
2012-10-21 Tobias Burnus <burnus@net-b.de>
PR fortran/54725
* Make-lang.in (CFLAGS-cpp.o): Use TARGET_SYSTEM_ROOT_DEFINE.
* cpp.o (gfc_cpp_init_options): Use it for
setting gfc_cpp_option.sysroot.
2012-10-21 Thomas König <tkoenig@gcc.gnu.org>
PR fortran/54465

View file

@ -341,6 +341,7 @@ GFORTRAN_TRANS_DEPS = fortran/gfortran.h fortran/libgfortran.h \
$(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_H) coretypes.h $(GGC_H) \
fortran/iso-c-binding.def fortran/iso-fortran-env.def
CFLAGS-fortran/cpp.o += $(TARGET_SYSTEM_ROOT_DEFINE)
fortran/f95-lang.o: $(GFORTRAN_TRANS_DEPS) fortran/mathbuiltins.def \
gt-fortran-f95-lang.h gtype-fortran.h $(CGRAPH_H) $(TARGET_H) fortran/cpp.h \
$(BUILTINS_DEF) fortran/types.def \

View file

@ -38,6 +38,10 @@ along with GCC; see the file COPYING3. If not see
#include "cppbuiltin.h"
#include "mkdeps.h"
#ifndef TARGET_SYSTEM_ROOT
# define TARGET_SYSTEM_ROOT NULL
#endif
#ifndef TARGET_CPU_CPP_BUILTINS
# define TARGET_CPU_CPP_BUILTINS()
#endif
@ -267,7 +271,7 @@ gfc_cpp_init_options (unsigned int decoded_options_count,
gfc_cpp_option.multilib = NULL;
gfc_cpp_option.prefix = NULL;
gfc_cpp_option.sysroot = NULL;
gfc_cpp_option.sysroot = TARGET_SYSTEM_ROOT;
gfc_cpp_option.deferred_opt = XNEWVEC (gfc_cpp_deferred_opt_t,
decoded_options_count);