aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHan Shen <shenhan@gcc.gnu.org>2012-01-06 00:14:32 +0000
committerHan Shen <shenhan@gcc.gnu.org>2012-01-06 00:14:32 +0000
commit17719d0974f0a12327950bf25550579d9f7914cc (patch)
treeaecf81e21c34cee9bcacb5cb76b633e096d4f169
parentb0c99997cc8ea804facfab420f1d7d1a0ecdbac6 (diff)
downloadgcc-17719d0974f0a12327950bf25550579d9f7914cc.zip
gcc-17719d0974f0a12327950bf25550579d9f7914cc.tar.gz
gcc-17719d0974f0a12327950bf25550579d9f7914cc.tar.bz2
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
-rw-r--r--gcc/ChangeLog15
-rw-r--r--gcc/Makefile.in2
-rwxr-xr-xgcc/configure15
-rw-r--r--gcc/configure.ac10
-rw-r--r--gcc/cppdefault.c9
5 files changed, 46 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 53d2c84..5742ae6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 33e1569..a03bb93 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -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)\" \
diff --git a/gcc/configure b/gcc/configure
index ba6156f..4dd9faa 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -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
@@ -27054,6 +27064,7 @@ fi
+
# Echo link setup.
if test x${build} = x${host} ; then
if test x${host} = x${target} ; then
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 12492ff..ffe7148 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -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)
diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
index 099899a..927083e 100644
--- a/gcc/cppdefault.c
+++ b/gcc/cppdefault.c
@@ -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. */