Translate built-in include paths for sysroot.

gcc/
	  * Makefile.in (gcc_gxx_include_dir_add_sysroot): New.
	  (PREPROCESSOR_DEFINES): Define GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT.

	  * cppdefault.c (cpp_include_defaults): Replace hard coded "0" with
	  GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT for "add_sysroot" field.

	  * configure.ac (AC_SUBST): Add gcc_gxx_include_dir_add_sysroot to
	  control whether sysroot should be prepended to gxx include dir.

	  * configure: Regenerate.

From-SVN: r182938
This commit is contained in:
Han Shen 2012-01-06 00:14:32 +00:00
parent b0c99997cc
commit 17719d0974
5 changed files with 46 additions and 5 deletions

View File

@ -1,3 +1,17 @@
2012-01-06 Han Shen <shenhan@google.com>
Translate built-in include paths for sysroot.
* Makefile.in (gcc_gxx_include_dir_add_sysroot): New.
(PREPROCESSOR_DEFINES): Define GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT.
* cppdefault.c (cpp_include_defaults): Replace hard coded "0" with
GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT for "add_sysroot" field.
* configure.ac (AC_SUBST): Add gcc_gxx_include_dir_add_sysroot to
control whether sysroot should be prepended to gxx include dir.
* configure: Regenerate.
2012-01-06 Torvald Riegel <triegel@redhat.com>
PR rtl-optimization/51771
@ -50,6 +64,7 @@
* cfgloopmanip.c (remove_path): Walk loop hiearchy upwards when
unlooping loops.
>>>>>>> .r182937
2012-01-05 Richard Guenther <rguenther@suse.de>
PR lto/50490

View File

@ -615,6 +615,7 @@ gcc_tooldir = @gcc_tooldir@
build_tooldir = $(exec_prefix)/$(target_noncanonical)
# Directory in which the compiler finds target-independent g++ includes.
gcc_gxx_include_dir = @gcc_gxx_include_dir@
gcc_gxx_include_dir_add_sysroot = @gcc_gxx_include_dir_add_sysroot@
# Directory to search for site-specific includes.
local_includedir = $(local_prefix)/include
includedir = $(prefix)/include
@ -3980,6 +3981,7 @@ PREPROCESSOR_DEFINES = \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
-DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
-DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
-DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
-DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
-DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \

15
gcc/configure vendored
View File

@ -637,6 +637,7 @@ host_xm_defines
host_xm_include_list
host_xm_file_list
host_exeext
gcc_gxx_include_dir_add_sysroot
gcc_gxx_include_dir
gcc_config_arguments
float_h_file
@ -3313,6 +3314,15 @@ if test x${gcc_gxx_include_dir} = x; then
fi
fi
gcc_gxx_include_dir_add_sysroot=0
if test "${with_sysroot+set}" = set; then
gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
if test "${gcc_gxx_without_sysroot}"; then
gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
gcc_gxx_include_dir_add_sysroot=1
fi
fi
# Check whether --with-cpp_install_dir was given.
if test "${with_cpp_install_dir+set}" = set; then :
@ -18106,7 +18116,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 18109 "configure"
#line 18119 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -18212,7 +18222,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 18215 "configure"
#line 18225 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -27052,6 +27062,7 @@ fi
# Echo link setup.

View File

@ -145,6 +145,15 @@ if test x${gcc_gxx_include_dir} = x; then
fi
fi
gcc_gxx_include_dir_add_sysroot=0
if test "${with_sysroot+set}" = set; then
gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
if test "${gcc_gxx_without_sysroot}"; then
gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
gcc_gxx_include_dir_add_sysroot=1
fi
fi
AC_ARG_WITH(cpp_install_dir,
[AC_HELP_STRING([--with-cpp-install-dir=DIR],
[install the user visible C preprocessor in DIR
@ -4927,6 +4936,7 @@ AC_SUBST(extra_programs)
AC_SUBST(float_h_file)
AC_SUBST(gcc_config_arguments)
AC_SUBST(gcc_gxx_include_dir)
AC_SUBST(gcc_gxx_include_dir_add_sysroot)
AC_SUBST(host_exeext)
AC_SUBST(host_xm_file_list)
AC_SUBST(host_xm_include_list)

View File

@ -44,15 +44,18 @@ const struct default_include cpp_include_defaults[]
= {
#ifdef GPLUSPLUS_INCLUDE_DIR
/* Pick up GNU C++ generic include files. */
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0, 0 },
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,
GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
#endif
#ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
/* Pick up GNU C++ target-dependent include files. */
{ GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, 0, 1 },
{ GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,
GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },
#endif
#ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
/* Pick up GNU C++ backward and deprecated include files. */
{ GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 0, 0 },
{ GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,
GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
#endif
#ifdef GCC_INCLUDE_DIR
/* This is the dir for gcc's private headers. */