This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[g++] find build_headers, gcc
- To: gcc-patches at gcc dot gnu dot org, aoliva at redhat dot com
- Subject: [g++] find build_headers, gcc
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Mon, 18 Dec 2000 00:16:04 -0800
gcc subdir changes to support target-dependent c++ includes.
See:
http://gcc.gnu.org/ml/gcc-patches/2000-12/msg00824.html
tested x86/linux
2000-12-17 Benjamin Kosnik <bkoz@redhat.com>
* configure.in (gcc_gxx_include_dir): Simplify.
(libstdcxx_incdir): Export.
* configure: Regenerate.
* Makefile.in (PREPROCESSOR_DEFINES): Add in
GPLUSPLUS_TOOL_INCLUDE_DIR bits here..
(libstdcxx_incdir): Add.
* cppdefault.c (GPLUSPLUS_TOOL_INCLUDE_DIR): Add search path.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/configure.in,v
retrieving revision 1.467
diff -c -p -r1.467 configure.in
*** configure.in 2000/12/12 20:28:49 1.467
--- configure.in 2000/12/18 08:14:56
*************** if test x${gcc_gxx_include_dir} = x; the
*** 188,194 ****
else
topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
changequote(<<, >>)dnl
! gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/g++"-${libstdcxx_interface}
changequote([, ])dnl
fi
fi
--- 188,194 ----
else
topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
changequote(<<, >>)dnl
! gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
changequote([, ])dnl
fi
fi
*************** AC_SUBST(extra_programs)
*** 1820,1825 ****
--- 1820,1826 ----
AC_SUBST(float_h_file)
AC_SUBST(gcc_config_arguments)
AC_SUBST(gcc_gxx_include_dir)
+ AC_SUBST(libstdcxx_incdir)
AC_SUBST(gcc_version)
AC_SUBST(gcc_version_full)
AC_SUBST(gcc_version_trigger)
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.568
diff -c -p -r1.568 Makefile.in
*** Makefile.in 2000/12/17 15:31:16 1.568
--- Makefile.in 2000/12/18 08:15:06
*************** gcc_tooldir = @gcc_tooldir@
*** 315,321 ****
# Since tooldir does not exist at build-time, use -B$(build_tooldir)/bin/
build_tooldir = $(exec_prefix)/$(target_alias)
# Directory in which the compiler finds g++ includes.
! gcc_gxx_include_dir= @gcc_gxx_include_dir@
# Directory to search for site-specific includes.
includedir = $(local_prefix)/include
# assertdir is overridden in cross-make.
--- 315,323 ----
# Since tooldir does not exist at build-time, use -B$(build_tooldir)/bin/
build_tooldir = $(exec_prefix)/$(target_alias)
! # Directory in which the compiler finds generic g++ includes.
! gcc_gxx_include_dir = @gcc_gxx_include_dir@
! # Directory where the compiler finds target-dependent files.
! libstdcxx_incdir = @libstdcxx_incdir@
# Directory to search for site-specific includes.
includedir = $(local_prefix)/include
# assertdir is overridden in cross-make.
*************** intl.all intl.install intl.uninstall \
*** 1866,1871 ****
--- 1868,1874 ----
PREPROCESSOR_DEFINES = \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
+ -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include/$(libstdcxx_incdir)\" \
-DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
-DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\"
Index: cppdefault.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cppdefault.c,v
retrieving revision 1.1
diff -c -p -r1.1 cppdefault.c
*** cppdefault.c 2000/07/06 22:52:03 1.1
--- cppdefault.c 2000/12/18 08:15:06
*************** const struct default_include cpp_include
*** 32,39 ****
#else
= {
#ifdef GPLUSPLUS_INCLUDE_DIR
! /* Pick up GNU C++ specific include files. */
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },
#endif
#ifdef LOCAL_INCLUDE_DIR
/* /usr/local/include comes before the fixincluded header files. */
--- 32,43 ----
#else
= {
#ifdef GPLUSPLUS_INCLUDE_DIR
! /* Pick up GNU C++ generic include files. */
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },
+ #endif
+ #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
+ /* Pick up GNU C++ target-dependent include files. */
+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1 },
#endif
#ifdef LOCAL_INCLUDE_DIR
/* /usr/local/include comes before the fixincluded header files. */