This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++] include directory configury
- To: gcc-patches at gcc dot gnu dot org
- Subject: [C++] include directory configury
- From: Alex Samuel <samuel at codesourcery dot com>
- Date: Fri, 2 Feb 2001 11:40:16 -0800 (PST)
- Organization: CodeSourcery, LLC
This change modifies how the compiled-in path to the G++
target-dependent header files is generated. The old code produced the
right directory, but in a form which init_standard_includes() did not
match as a subdirectory of cpp_GCC_INCLUDE_DIR. As a result, if you
moved the G++ installation to another path, the driver couldn't figure
out the location of the target-dependent headers (as it can for, e.g.,
the target-independent G++ headers).
My solution is to use logic for the target-dependent include path
(gcc_gxx_target_include_dir) analogous to what configure generates for
the target-independent include path (gcc_gxx_include_dir) if you don't
specify the --with-gxx-include-dir flag.
This patch is approved by Mark, but it's pretty ugly. If someone can
suggest a better way of doing this, I'd be happy to provide a more
beautiful patch.
* Makefile.in (gcc_gxx_target_include_dir): Generate dynamically
as for gcc_gxx_include_dir.
Index: gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.593
diff -c -p -r1.593 Makefile.in
*** Makefile.in 2001/01/29 01:48:06 1.593
--- Makefile.in 2001/02/02 19:30:40
*************** build_tooldir = $(exec_prefix)/$(target_
*** 319,325 ****
# Directory in which the compiler finds target-independent g++ includes.
gcc_gxx_include_dir = @gcc_gxx_include_dir@
# Directory in which the compiler finds target-dependent g++ includes.
! gcc_gxx_target_include_dir = $(build_tooldir)/include/@libstdcxx_incdir@
# Directory to search for site-specific includes.
includedir = $(local_prefix)/include
# assertdir is overridden in cross-make.
--- 319,325 ----
# Directory in which the compiler finds target-independent g++ includes.
gcc_gxx_include_dir = @gcc_gxx_include_dir@
# Directory in which the compiler finds target-dependent g++ includes.
! gcc_gxx_target_include_dir = $(libsubdir)/$(unlibsubdir)/..`echo $(exec_prefix) | sed -e 's|^$(prefix)||' -e 's|/[^/]*|/..|g'`/$(target)/include/@libstdcxx_incdir@
# Directory to search for site-specific includes.
includedir = $(local_prefix)/include
# assertdir is overridden in cross-make.